How to remember last state with Jquery?
Posted
by AR
on Stack Overflow
See other posts from Stack Overflow
or by AR
Published on 2010-03-26T23:10:10Z
Indexed on
2010/03/26
23:13 UTC
Read the original article
Hit count: 125
I have a menu with submenus that can be toggled (hide/show type deal). Is there a relatively easy way to remember last state of the menu? (I hide/show submenu when clicking on a header and change a style of the header so the background arrow will change (up/down)). It works fine, but I'd like it to remember last state, so when user goes to another page on the site and gets back, the menu shows the same way as user left it. I'm not really good with cookies so any help will be appreciated. Yeah, menu is generated dynamically from the db using PHP. There are now only 2 headers with submenus, but there will be more so I'd need some method that's "scalable" for any number of submenus. There is also no need to remember it for longer then one visit.
Current url is this: http://valleyofgeysers.com/geysers.php
© Stack Overflow or respective owner