4 ms·
Why is everyone missing this? JQuery is a library that provides a consistent API across browsers. In a future release couldn't they detect CSS3 animation supp
by mcot2 15y ago
Why is everyone missing this? JQuery is a library that provides a consistent API across browsers. In a future release couldn't they detect CSS3 animation support and update the animate function to use them if supported?
Some projects are already doing this:
http://www.benbarnett.net/2010/09/01/enhancing-jquerys-animate-function-to-automatically-use-css3-transitions/ http://www.benbarnett.net/2010/09/01/enhancing-jquerys-anima...
Sounds like it should go into mainline jquery pretty soon.
- richbradshaw 15y agoExactly - hopefully this will happen one day. Having used that plugin though it doesn't work perfectly on all code (jQuery Cycle + that for instance doesn't always work as expected). Any mention of transitions seems to result in a wontfix if you check through the jQuery bug tracker.
- mcot2 15y agoI suspect what is holding it up is both browser support and the time required to get it right. Maybe they don't use animate but provide a separate wrapper. Keep in mind, the specs are rather large. When people talk about CSS "animations" there really talking about at least 3 specs, maybe 4. CSS 2D transforms, CSS 3D transforms, CSS transitions and CSS animation. There is a lot of work to get it right and tested in a nice JS wrapper, not to mention making it work with an existing JS based API.