Sorry, an update glitch. Now it is up there and the expanded menu tries to close and then reopens. Maybe this is related to the persiststate variable. Home is a special case and I need all the menus to close for home.
Sorry, an update glitch. Now it is up there and the expanded menu tries to close and then reopens. Maybe this is related to the persiststate variable. Home is a special case and I need all the menus to close for home.
Last edited by anyalynn; 07-30-2008 at 10:44 PM.
Ok, looks like a timing issue. Collapse_all() collapses every header in a group using the script's accordion animation. The problem with that is that by the time the headers are actually closed, the user is already taken to the target page set by the "Home" link. With persistence on, the headers are remembered as expanded, hence appear to snap back on the target page.
A solution it seems would be to instantly hide the headers (instead of via an animation) when the "Home" link is clicked on. Instead of what I had posted earlier, try the following changes to the "Home" link:
Untested, but should work.Code:<h3><a href="index.php" onClick="jQuery('.categoryitems').hide()">Home</a></h3>
Edit: Fixed error
Last edited by ddadmin; 07-31-2008 at 05:02 AM.
I made the change you suggested on the server and it still does something weird, and ultimately does not stay collapsed
Ops, I forgot in this case, the parameter passed into jQuery() shoulld be "categoryitems" instead of "expandable". I've fixed the typo above. Please try again.
anyalynn (07-31-2008)
It works! There is a little delay but I can live with that. Thanks again for the help!
Bookmarks