jQuery(document).ready(function(){ // Keep attributes in sync with Normal.Master.cs. $("#ctl00_hidePanel").click(function(){ $("#ctl00_side").animate({width:"0px", opacity:0}, 400 ); $("#ctl00_panel").animate({marginLeft:"-200px"}, 500 ); $("#ctl00_showPanel").show("normal").animate({width:"38px", opacity:1}, 200); $("#ctl00_content").animate({marginLeft:"50px"}, 500); $("#sideMenuCollapsed").val("1"); // set hidden field to preserve state across postbacks }); $("#ctl00_showPanel").click(function(){ $("#ctl00_side").animate({width:"200px", opacity:1}, 400 ); $("#ctl00_panel").animate({marginLeft:"0px"}, 400 ); $("#ctl00_showPanel").animate({width:"0px", opacity:0}, 600).hide("slow"); $("#ctl00_content").animate({marginLeft:"165px"}, 200); /* keep margins constistent with styles.css */ $("#sideMenuCollapsed").val("0"); // set hidden field to preserve state across postbacks }); });