jquery expendable menu & css

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
  1. $(document).ready(function()
  2. {
  3. // First we hide all menus 
  4. $("#menu ul li.section-title").nextAll().hide();
  5. // then the active menu is showed
  6. $("#menu ul").each(function()
  7. {
  8. $(this).find("li.active").prevAll().nextAll().show();
  9. });
  10. // This is the toggle function
  11. // first it hides all sections
  12. $("#menu ul li.section-title").click(function()
  13. {
  14. $("#menu ul li.section-title").nextAll().hide();
  15. $("#menu ul li.section-title").css({'color':'#ACB3B9'});
  16. $(this).css({'color':'black'});
  17. $(this).nextAll().slideToggle("fast");
  18. });
  19. });