Results 1 to 2 of 2

Thread: Animated Collapsible DIV

  1. #1
    Join Date
    Mar 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Animated Collapsible DIV

    Hello.

    I have just started to integrate the Animated Collapsible DIV onto a web page.

    I want to have a single 'show/hide' button, with several DIV's being hidden/shown at the same time.

    At the moment I have set it up so I have several DIV's. such as:

    Code:
    <div id="jason"><p>hello, my name is grant</p></div>
    
    <div id="jason"><p>how are you?</p></div>
    
    <div id="jason><p>goodbye</p></div>
    With one hide/show button at the top of the page. When I click 'hide/show', only the very first div hides/shows, the other two do not hide or show.

    I wondered if it is possible to amend the script so that all of the same div id's will action at the same time so that I can expand/collapse all of the <div>'s using one single button.

    I don't mind paying for somebody to edit the script to do so, but would appreciate if someone could advise on a solution.

    Thanks,
    Grant

  2. #2
    Join Date
    Aug 2004
    Posts
    9,887
    Thanks
    3
    Thanked 963 Times in 952 Posts
    Blog Entries
    15

    Default

    Can't you just give each DIV a unique ID, then show/hide them together using something like:

    Code:
    animatedcollapse.show(['jason', 'kelly', 'michael']) //show all 3 DIVs?
    Technically the unique ID attribute should be just that, unique in its value on the page. Giving multiple DIVs the same ID can create problems, some unforeseen.
    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
  •