I have created a menu that slides in from outside of the page. The problem is that when you click on an item in the menu and load a new page, the new page loads with the menu closed. Is there a way to tell the browser to keep the menu open after a new page load?
this is the code that opens up the menu
<script>
$(document).ready(function(){
$("#closeIcon").hide()
$(".left").width('0%');
$(".right").width('100%');
});
$(document).ready(function(){
$("#menuIcon").click(function(){
$(".left").animate({width:'10%'}, "500");
$(".right").animate({width:'90%'}, "500");
$("#nav").animate({
left: '30%',
}, "500" );
$("#menuIcon").fadeOut(500)
$("#closeIcon").fadeIn(500)
});
});
$(document).ready(function(){
$("#closeIcon").click(function(){
$(".left").animate({width:'0%'}, "500");
$(".right").animate({width:'100%'}, "500");
$("#nav").animate({
left: '0',
}, "500" );
$("#menuIcon").fadeIn(500)
$("#closeIcon").fadeOut(500)
});
});
</script>
this is the html:
<html>
<div id="menu" >
<div id="menuIcon">
<a href="javascript: void(0)">
<img src="images/menuIcon.png">
</a>
</div>
<div id="closeIcon">
<a href="javascript: void(0)">
<img src="images/closeIcon.png">
</a>
</div>
</div>
</html>
<div class="left">
<div id="nav">
<div id="accordion">
</div> <!--ends accordion-->
</div>
</div>
<div class="right">
<div id="content">
</div><!--ends content-->
</div><!--ends right-->