News for hackers. Stuff that matters.
Re:Sidr - A jQuery plugin for creating side menus by LAMike on Sunday March 31, 2013 @05:00AM (#5468147)
Hey, this is exactly what I was looking for! Thanks. Can someone explain why css animations are more efficient than javascript animations? Or is it just a matter of preference
Re:Sidr - A jQuery plugin for creating side menus by quarterto on Sunday March 31, 2013 @05:22AM (#5468175)
Modern browsers can hardware-accelerate CSS animations. http://blog.teamtreehouse.com/increase-your-sites-performanc...
Re:Sidr - A jQuery plugin for creating side menus by dbushell on Sunday March 31, 2013 @06:24AM (#5468287)
jQuery animate (and any JS animation) iterates over CSS properties by updating an elements style attribute. Updating the DOM at this rate forces repaint/reflows and is rarely going to perform well.

CSS transitions/transforms let the browser render once on separate layers. The animation frames can then be composited faster (and accelerated on the GPU).

Paul Irish has a great demo: http://paulirish.com/2012/why-moving-elements-with-translate...