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 :
- <script type="text/javascript">
-
- $(document).ready(function(){
- $( '#search-nav > li > ul' )
- .hide()
- .click(function( e ){
- e.stopPropagation();
- });
-
- $('#search-nav > li').toggle(function(){
- $(this)
- .css('background-position', 'right -20px')
- //.css('background: url(images/toggle_minus.gif')
- .find('ul').slideDown();
-
- }, function(){
- $( this )
- .css('background-position', 'right top')
- .find('ul').slideUp();
- });
-
- });
- </script>
If anyone has any ideas, that is greatly appreciated. Thanks!