Reputation: 2395
So I know now CSS3 is a lot faster than jQuery, but I want to know how CSS3 is spread nowadays, is it wide-spread? I believe jQuery is better this way because, you can animate CSS2 with it as well, so older browsers show animation, but if there are only a few people using older browsers I don't think I should use jQuery, or maybe there is a solution that my app will recognize whether the browser supports css3 or not, and if not, it tries to run the animation with jQuery/JavaScript?
Upvotes: 1
Views: 2599
Reputation: 3407
jQuery Transit lets you create CSS animations with classic jQuery syntax and can fallback to js animations on unsupported browsers
Basically the problem is IE < 10, so you could consider just using css animations with no fallback; animations can be considered progressive enhancement and not having them on some browsers doesn't jeopardize user experience that much. On top of that IE<9 has poor javascript performance so the fallback js animations wouldn't be so pleasant anyway.
Upvotes: 4
Reputation: 2618
JQuery is supported provided you have the libraries included, but not all the animations CSS is supported by all browsers.
Upvotes: 0
Reputation: 64526
Use jQuery if you want the most compatibility. A lot of people still use old browsers such as Internet Explorer 8, which doesn't have the CSS3 support.
From MSDN:
Microsoft Internet Explorer 6 was the first fully Cascading Style Sheets, Level 1 (CSS1)-compliant version of Internet Explorer. Windows Internet Explorer 8 is fully compliant with the Cascading Style Sheets, Level 2 Revision 1 (CSS2.1) specification and supports some features of Cascading Style Sheets, Level 3 (CSS3). Windows Internet Explorer 9 and Internet Explorer 10 add even more support for many CSS3 modules.
Upvotes: 0