jQuery Animation vs GreenSock TweenMax

GomatoX picture GomatoX · Dec 16, 2012 · Viewed 10.5k times · Source

I encounter with a question what the cons and pros of using jquery.animate() and GreenSock TweenMax animating engines. So maybe there is any one who knows it. There is not enough information on the web, also what about the performance.

I tried to use both, jquery.animate() and tweenMax, but in some cases i prefer to use jQuery engine, in other GreenSock.

I'm trying to decide which is better, and not to jump from one to other.

Thanks in future, it's realy interesting to know which to use.

Engines:

http://jquery.com

https://www.greensock.com/gsap-js/

Answer

Gurpreet Singh picture Gurpreet Singh · Dec 16, 2012

jQuery's fadeIn() and fadeOut() methods are quite convenient. However, if you are going for something more expressive, I would suggest you to use GSAP (GreenSock Animation Platform). jQuery animations are generally bit slow and TweenLite is significantly faster (20 times) than jQuery animation according to GreenSock.

In addition you will be getting really handy functions for animations such as reverse, bezier curve, timeshift, pause & skew etc and better hardware acceleration support on mobile devices.

Personally, I think GSAP is better but a tiny handy selector engine would have been cool.

Here is very good comparison between two.

UPDATE

HTML5 Animation Speed Test