4 ms·
jQuery animate is terrible for performance. The demo lags at a few frames per second (and I'm testing on a Nexus 4). CSS transitions are the method for this. N
by dbushell 14y ago
jQuery animate is terrible for performance. The demo lags at a few frames per second (and I'm testing on a Nexus 4).
CSS transitions are the method for this. Not without their own caveats, but usable. I've written extensively on the subject with this exact implementation of an off-canvas menu: http://coding.smashingmagazine.com/2013/01/15/off-canvas-navigation-for-responsive-website/ http://coding.smashingmagazine.com/2013/01/15/off-canvas-nav...
- augustflanagan 14y agoThis 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.