kiryavipman
New Member
I have a vertical 2 level jquery menu, and I'd need that after a link has been clicked and the new page loaded, the menu stay open with the selected link highlighted.here is my menu code: \[code\] <div id="my-menu"> <ul> <li><span class="toggle">Una Passione</span> <ul> <li><a href="http://stackoverflow.com/questions/14599272/Trefratelli.aspx">Tre Fratelli</a></li> <li><a href="http://stackoverflow.com/questions/14599272/Conlenostremani.aspx">Con le nostre mani</a></li> <li><a href="http://stackoverflow.com/questions/14599272/#">La nostra storia</a></li> <li><a href="http://stackoverflow.com/questions/14599272/#">Il video</a></li> <li><a href="http://stackoverflow.com/questions/14599272/Libro.aspx">Il libro</a></li> </ul> </li> <li><span class="toggle">Icone</span> <ul> <li><a href="http://stackoverflow.com/questions/14599272/Icone_Brera.aspx">Brera</a></li> <li><a href="http://stackoverflow.com/questions/14599272/Icone_Magenta.aspx">Magenta</a></li> </ul> </li> </ul> </div>\[/code\]and here the jquery code: \[code\] $(document).ready(function() {$("span.toggle").next().hide();$("span.toggleinterno").next().hide();$("#my-menu a, #my-menu span.toggle").click(function() { $(this).stop().animate( { color:"red" }, 300);});$("span.toggle").click(function() { if ($(this).hasClass('second')) { $(this).removeClass('second'); } else { $(this).addClass('second'); }}); $("#my-menu a, #my-menu span.toggleinterno").click(function() { $(this).stop().animate( { fontSize:"17px", //paddingLeft:"10px", color:"black" }, 300);}, function() { $(this).stop().animate( { //fontSize:"14px", paddingLeft:"15", color:"#808080" }, 300);});$("span.toggle").css("cursor", "pointer");$("span.toggleinterno").css("cursor", "pointer");$("span.toggle").click(function() { $(this).next().toggle(1000);});$("span.toggleinterno").click(function() {$("span.toggleinterno").css("width", "100px"); $(this).next().toggle(1000);});\[/code\]});Thank you for any help.