I am having this situation: - having a php page - having a jQuery script that collapses a menu - clicking on one of the collapsed elements to load another page by passing variable(s) in php
Problem: - jQuery script reloads too and cancels my previous choice.
Here is an example. I click on "Menu", jQuery script acts on "collapser" but when I click on the "Fish" link (or other), I got the page displayed but the menu will not be shown as collapsed.
What I want to achieve: - to keep the menu collapsed while moving from one page to another
here is a php code sample.
echo rightMenu();
function rightMenu(){
$r = '';
$r .= '<ul id="collapser"><li>Menu<ul>';
$r .= '<li><a href="main.php?show=page1">Fish</a></li>';
$r .= '<li><a href="main.php?show=page2">Vegetables</a></li>';
$r .= '<li><a href="main.php?show=page3">Meat</a></li></ul>';
$r .= '</li></ul>';
return $r;
};
Thank you, Myriam