html - jQuery - Sidebar that slides in, and keep the window width -
i've been trying figure out i've not managed yet.. i'm asking help!
what want is: when user clicks button sidebar either shown or hidden. content should follow, slide same direction sidebar, , user should not able see y overflow.
this want do: http://mikedidthis-pierre.tumblr.com/
thanks in advance! cheers
create button toggle menu:
var menuenabled = false; $("button").click(function() { if (menuenabled) { $("#left").css("display", "none"); $("#content").css("margin-left", "0"); menuenabled = false; } else { $("#left").css("display", "block"); $("#content").css("margin-left", "200px"); menuenabled = true; } });
full demo here: http://jsfiddle.net/ywrsb/4/
Comments
Post a Comment