Suppose I have 10 elements on a page.
At the current moment I’m iterating them in a loop changing width and position:
el[i].style.width = ....
el[i].style.left = ....
I’m wondering if the animation could run faster if I tell the browser to re-render all elements only once, after the loop has finished
Using CSS3 is faster and you will have to code a lot less, have a look at this Jsbin, I just did two examples, one with transition (.anima2) and the other with animation (.anima). With JS you just have to apply and remove the classes.