what's faster? CSS3 transitions or jQuery animations?

Moisés Olmedo picture Moisés Olmedo · Jun 11, 2012 · Viewed 21.7k times · Source

I'm working on an iPad HTML5 app and I've already implemented ontouch support to trigger events faster and I'm using jQuery to target the elements easier, but for the animations I'm using CSS3 transitions

What do you think is faster? using jQuery animations since I already have imported the library or use CSS3 transitions when targeting elements with jQuery?

Answer

Ashish Gupta picture Ashish Gupta · Jun 11, 2012

According to this link, jQuery animation is much slower then css animation.

Reason can be because jquery has to modify the props of the DOM element using timers and a loop. The CSS is part of the browser engine . which depends pretty much on hardware of system. You can also check that in profiling of Chrome or Firefox.