Hello, I have the following HTML code:
<form action="" name = "myform" method = "post">
<div id= "button">myButton</div>
<div id="submit"><input type="submit" name = "submit" value="update"></div>
<div class = "hiddenMenu" >
<div id = "checkboxes">
<input type="checkbox" name="checkbox1">Checkbox1
<input type="checkbox" name="checkbox2">Checkbox2
</div>
</div>
</form>
And corresponding Jquery code:
jQuery(document).ready(function($)
{
jQuery("#button").click(function()
{
jQuery(".hiddenMenu").slideDown();
});
});
All it does is when user presses on "button" - the "hiddenMenu" with checkboxes slides down. This works perfectly, but the problem is that when I press on "submit" button - page reloads and "hiddenMenu" dissappears so that I have to press "button" again to make "hiddenMenu" visible again. How is it possible to prevent this menu from sliding up after reloading? so that once you pressed button, menu slides down and even after reloading it stays visible? I think it is something to do with "return false", but I dont know where to put this statement. Another question is how to modify jquery so that the only time this menu slides up again is when I press on "button" again?
Thank you very much,