Skip to content Skip to sidebar Skip to footer

Should I Use/avoid JQuery Animate?

A question popped to mind answering to this one, where OP wanted to apply this transition: test.css({transition: 'height 1s linear', height: '100px'}); And then to go back to this

Solution 1:

A conclusion from all the comments:

jQuery was not created for animating objects, so it may be slow and laggy (depending on what and how much you're animating). But scrolling a page with jQuery's .animate() function for example works very good in most cases.

For more advanced animations (like moving objects or doing complex or many animations at the same time), use libraries as velocity.

If you just want to animate text style/color or a slide-down menu, it's faster (and easier IMO) to use CSS transitions/animations.

So it depends on what you're doing. Hope this helps!


Post a Comment for "Should I Use/avoid JQuery Animate?"