1

Hi I have a task where I do some heavy JavaScript animation, and I reposition various items using a timer. Now once the timer goes off, I move the elements by going through them all and changing their CSS properties.

Is there someway I can change all the CSS properties at once and than redraw? Because if there's really a lot of elements the page gets a little laggy.

Ps: would css3 animation help here? Pps: does image resolution influence the speed a lot? Ppps: it's not a normal website so the animations are necessary

Samuel
  • 18,286
  • 18
  • 52
  • 88
  • 1
    I think you should look around here: https://developer.mozilla.org/en/DOM/window.requestAnimationFrame – biziclop Mar 04 '12 at 12:01
  • Very interesting, a shame it isn't standard yet! – Samuel Mar 04 '12 at 13:02
  • I use Safari, and during animations it uses a faster/blockier image resizing method. And you may check this: http://stackoverflow.com/questions/7999680/why-doesnt-jquery-use-requestanimationframe – biziclop Mar 04 '12 at 13:05

0 Answers0