TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Sidr - A jQuery plugin for creating side menus

112 pointsby pajjuabout 12 years ago

11 comments

ricardobeatabout 12 years ago
How do you close it?<p>Taking a look at the source, it should use CSS translateY instead of javascript animation, would perform much better specially on mobile devices.
评论 #5468094 未加载
dbushellabout 12 years ago
jQuery animate is terrible for performance. The demo lags at a few frames per second (and I'm testing on a Nexus 4).<p>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: <a href="http://coding.smashingmagazine.com/2013/01/15/off-canvas-navigation-for-responsive-website/" rel="nofollow">http://coding.smashingmagazine.com/2013/01/15/off-canvas-nav...</a>
评论 #5469349 未加载
start123about 12 years ago
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.
评论 #5468071 未加载
jacquescabout 12 years ago
This looks pretty good. Currently using <a href="http://jpanelmenu.com/" rel="nofollow">http://jpanelmenu.com/</a>, though I'll have to try this one out to see how it compares.
ajanuaryabout 12 years ago
On mobile safari it seems to keep opening and closing the menu as I scroll, seemingly randomly.
评论 #5468338 未加载
tegansnyderabout 12 years ago
I built a few different approaches to do these menus a while back. Mostly intended to be used on Phonegap applications where you can restrict the web view bounce. Yours look way more configurable but if anyone is interested in a Zepto.js version: <a href="https://github.com/tegansnyder/Zepto-Mobile-Slide-Menu" rel="nofollow">https://github.com/tegansnyder/Zepto-Mobile-Slide-Menu</a> I also have a JQuery version: <a href="https://github.com/tegansnyder/JQuery-Mobile-Slide-Menu" rel="nofollow">https://github.com/tegansnyder/JQuery-Mobile-Slide-Menu</a> and a neat little dropdown from top version: <a href="https://github.com/tegansnyder/CNN-Like-Swipe-From-Top-Menu-Zepto.js-Mobile-HTML5" rel="nofollow">https://github.com/tegansnyder/CNN-Like-Swipe-From-Top-Menu-...</a>
LAMikeabout 12 years ago
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
评论 #5468175 未加载
评论 #5468287 未加载
michaelmartinabout 12 years ago
It's cool to see more libraries appearing for this effect. I think it's really nice on the responsive demo at least.<p>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.<p>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.
mistercowabout 12 years ago
Pretty neat. What would be especially useful would be if you could support nested lists for creating submenus.
peachananrabout 12 years ago
Now, this is useful for responsive design. :)
评论 #5471217 未加载
futheyabout 12 years ago
mmm, Cider...