Does jQuery animation use css3 transitions in modern browsers?

I am using version 1.8+.

Since css transitions are hardware accelerated, I was wondering if, behind the scenes, the iQuery animate function relies on css3 transitions (for modern browsers).

I have not seen mention of this in animate docs http://api.jquery.com/animate/

+4
source share
4 answers

No. It quickly changes the meaning of inline style attributes, step by step, to create an impression of animation.

+4
source

jQuery is not using CSS 3 yet, probably due to minor issues between browsers in the way they implement custom use cases. So far, not everything is agreed, and sometimes there are errors that are very difficult to circumvent.

However, there are plugins like jQuery Transit that use CSS 3 animations / transitions, etc. With Transit, you can return to using .animate() as follows:

 // Delegate .transition() calls to .animate() // if the browser can't do CSS transitions. if (!$.support.transition) $.fn.transition = $.fn.animate; 

http://ricostacruz.com/jquery.transit/

+1
source

From the source you can see that it does not use CSS3 (yet) for animation. (To see the animation code, search for “animation features”.)

0
source

No jQuery uses css transitions, but Zepto (jQuery compatible) uses CSS transitions for all its animations and performs better than jQuery .

0
source

Source: https://habr.com/ru/post/1444887/


All Articles