3

Is there an equivalent for the jQuery $.css function in dart?

I can read the (computed) style of an element, but as far as I can see there is no way of setting a style.

1 Answer 1

6

Using Element.style isnt enough ?

myDiv.style.backgroundColor = 'red';
myDiv.style.setProperty('-webkit-cssexperimental','value');

It's also working with a multi elements selector:

querySelectorAll('div').style.backgroundColor = 'green'; //color every div
Sign up to request clarification or add additional context in comments.

1 Comment

for whatever reason I tried that before and it didn't work.anyway, thanks, that's what I needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.