This article was great! I had implemented a side menu on my own a couple of days before this came out. It was using css transitions on the width property which was fine on desktop, but clunky on mobile. I re-worked it following your approach and was really happy with the results.
The plugin currently shifts the main content pane to the right. It would be great if it could reduce its width instead, so the entire content can fit in the screen.
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
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).
It's cool to see more libraries appearing for this effect. I think it's really nice on the responsive demo at least.
It does beg some questions about using it in non-touch scenarios though. The experience with a mouse isn't the best right now because everything moves.
Would be curious about the menu having a close button of its own, in the exact same position that the "Menu" you would have clicked to open it was in.
Although I'm not sure if the responsive term is meant to include desktop resizes, nor if it is just a problem on the site itself (which is a problem in itself); the site includes both top and side menu when going from a small browser window to a big one.
Taking a look at the source, it should use CSS translateY instead of javascript animation, would perform much better specially on mobile devices.