Opening submenu depending on what url
Hi there, I am rather new to jQuery and I got stuck. I made myself a simple slideup/slidewon menu. On default the subcontent is hidden, but I would like to show the subcontent of the menu depending on where I am.
-
$(document).ready(function() {
$('div.subnav').hide();
$('div.navheader').click(function() {
$(this).next().slideToggle('fast');
return false;
});
$('div.navheader a').click(function() {
$(this).toggleClass("active");
});
});
-
<div class="navhlavicka"><a href="#" class="top"><span class="clanek">Articles</span></a></div>
<div class="subnav">
<ul class="submenu">
<li><a href="./?page=articles" title="Edit Articles">Edit Articles</a></li>
<li><a href="./?page=articles&cat=new&kat=&id=&idkat=" title="Add">Add</a></li>
</ul>
</div>
So if I open page Edit Articles - ?page=articles, I would like to get the subnav opened.
Thank you for your time