Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Accordion Content Script

  1. #11
    Join Date
    Jul 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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.

  2. #12
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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:

    Code:
    <h3><a href="index.php" onClick="jQuery('.categoryitems').hide()">Home</a></h3>
    Untested, but should work.

    Edit: Fixed error
    Last edited by ddadmin; 07-31-2008 at 05:02 AM.

  3. #13
    Join Date
    Jul 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unhappy Still not working

    I made the change you suggested on the server and it still does something weird, and ultimately does not stay collapsed

  4. #14
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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.

  5. The Following User Says Thank You to ddadmin For This Useful Post:

    anyalynn (07-31-2008)

  6. #15
    Join Date
    Jul 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Smile Thank you

    It works! There is a little delay but I can live with that. Thanks again for the help!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •