Results 1 to 4 of 4

Thread: Animated Collapsible DIV v2.4 Grouped Items

  1. #1
    Join Date
    Nov 2009
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Animated Collapsible DIV v2.4 Grouped Items

    1) Script Title: Animated Collapsible DIV v2.4

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...edcollapse.htm

    3) Describe problem:

    I implemented this script on my site and love it! I wanted the cleanest UI possible and opted to "group" the items in my list so that when another item in the list is clicked it will hide the previous and expand the current. I have a large number of users who would like the option to "view all", but the grouping of the elements do not allow all the DIVs to be displayed at once.

    Is there an addition to the script or a "view all" button that could override the grouping restriction so that all DIVs could be expanded at the same time?
    Last edited by ericdolson; 11-16-2009 at 02:07 AM. Reason: Clarify description

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

    Default

    Sure, you can try the attached modified .js file. Then when calling the public function show() to reveal a list of animated DIVs, populate the new second parameter with the value "true", for example:

    <a href="javascript:animatedcollapse.show(['cat', 'dog', 'rabbit'], true)">Show Hide these DIVs</a>

    Assuming "cat", "dog", and "rabbit" belong to the same group, they will now all expand when the above is clicked on, versus just the last one.
    DD Admin

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

    ericdolson (11-19-2009)

  4. #3
    Join Date
    Nov 2009
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Thank you!

    That worked perfectly! Thank you for the modified script! I implemented it with a "show all" button and all the DIVs that were grouped together stayed opened just like you said. I also implemented a "hide all" button to clean everything up again by collapsing all the DIVs. After the "close all" function and the DIVs collapsed, I clicked on the individual list items and they worked as before as grouped items with an expanding DIV collapsing the previous...PERFECT! That is exactly what I was looking for!

    Thank you for the genius work!

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

    Default

    Not a problem, glad I could help!
    DD Admin

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
  •