In my layout I have a navigation bar with a few elements in it. The elements can be toggled on or off and thereby reveal or conceal some subtopics. I store the state of the toggle for the navigation elements in the session. When the page is reloaded, the navigation items are collapsed because the css for display: none is set by default in the html for the navigation elements. Is there a good way to pull the state of the navigation elements from the session and reset the default css? I'd like to restore the navigation to the way the user left it. Thanks.
on 2006-06-06 13:23
on 2006-06-06 14:17
on 2006-06-07 16:36
you need to asynchronously update the session contents using ajax requests on expand and collapse. pseudocode expand -> send ajax request -> session[:state][:node_id] = true collapse -> send ajax request -> session[:state][:node_id] = nil Bill schrieb: