I'm doing a lot of
element.css {
style1: val1
style2: val2
...
}
using jQuery, and right now it's a performance bottleneck for me. Looking at jQuery's implementation, it seems to be setting each style individually, resulting in multiple modifications of the style attribute.
Presumably in this case, we only need to modify the style attribute once. However, I'm a little hesitant to re-implement .css. Has anyone done this already? If I do decide to reimplement it, are there going to be gotchas to be aware of?