I have a lot of animations to fulfill on my website, right now I'm doing pure CSS for these animations. Is it better to use CSS or is it better to use Jquery?
I would have to agree with symmet, you need both. This way if a user doesn't have a recent version of Firefox, Google Chrome, Safari or Opera you can have jQuery to fall back on.
-You can use browser detection to conditionally enable jQuery scripts on page load. You can use Javascript/jQuery or a server-side script to detect exactly which browser is loading the page.
-You can also check out http://www.modernizr.com/. It adds classes to the html element which allow you to target specific browser functionality in your stylesheet.
4 comments
[ 3.2 ms ] story [ 18.7 ms ] threadCSS animations can take advantage of hardware graphics acceleration and they render very nicely on mobile browsers.
So, my answer is: both.
I would have to agree with symmet, you need both. This way if a user doesn't have a recent version of Firefox, Google Chrome, Safari or Opera you can have jQuery to fall back on.
-You can use browser detection to conditionally enable jQuery scripts on page load. You can use Javascript/jQuery or a server-side script to detect exactly which browser is loading the page.
-You can also check out http://www.modernizr.com/. It adds classes to the html element which allow you to target specific browser functionality in your stylesheet.
Let me know if you need any help with that,
Good luck!
Karl