keeping accordion menu open when page refreshes

keeping accordion menu open when page refreshes

Hi there -

I've been searching for a bit, but I cannot seem to find a solution to keep an accordion menu expanded when the page refreshes.  I found some stuff with using $cookie, but I am not sure exactly what it would be looking for or calling in my code.

Here's my code :

  1. <script type="text/javascript"> 
  2.  


  3. $(document).ready(function(){
  4. $( '#search-nav > li > ul' )
  5. .hide()
  6. .click(function( e ){
  7. e.stopPropagation();
  8. });
  9.    $('#search-nav > li').toggle(function(){
  10.  $(this)
  11.       .css('background-position', 'right -20px')
  12.  //.css('background: url(images/toggle_minus.gif')
  13.  .find('ul').slideDown();
  14.       
  15.   }, function(){
  16.    $( this )
  17.       .css('background-position', 'right top')
  18.       .find('ul').slideUp();
  19.   });

  20. });


  21. </script>
If anyone has any ideas, that is greatly appreciated.  Thanks!