jquery expendable menu & css
Hi,
Im new to js and this is maybe a very easy thing to do but I m lost ...
any help would be very appreciated 
I have an expandable menu using jquery on my website, when I click on a menu title it becomes black , and the sub menu item too . Ok
But i want the active menu title to stay black when a page is loaded or if the page is refreshed.
any help would be very appreciated !
thanks
- $(document).ready(function()
- {
- // First we hide all menus
- $("#menu ul li.section-title").nextAll().hide();
- // then the active menu is showed
- $("#menu ul").each(function()
- {
- $(this).find("li.active").prevAll().nextAll().show();
- });
- // This is the toggle function
- // first it hides all sections
- $("#menu ul li.section-title").click(function()
- {
- $("#menu ul li.section-title").nextAll().hide();
- $("#menu ul li.section-title").css({'color':'#ACB3B9'});
- $(this).css({'color':'black'});
- $(this).nextAll().slideToggle("fast");
- });
- });