Results 1 to 6 of 6

Thread: Animated DIV Tag Problem

  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Thumbs up Animated DIV Tag Problem

    1) Script Title: Animated Div Tag

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

    3) Describe problem: Ok if you go to www.mqndesign.com/onpoint and click the toggle buttons under the puzzle you will see that they stack on top of each other. I would like them to collapse once another toggle button is pressed. Is this possible? Please help I would greatly appreciate it.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Change:
    Code:
    animatedcollapse.addDiv('info_box', 'fade=1,height=200px')
    animatedcollapse.addDiv('info_box_2', 'fade=1,height=200px')
    animatedcollapse.addDiv('info_box_3', 'fade=1,height=200px')
    animatedcollapse.addDiv('info_box_4', 'fade=1,height=200px')
    animatedcollapse.addDiv('info_box_5', 'fade=1,height=200px')
    animatedcollapse.addDiv('info_box_6', 'fade=1,height=200px')
    animatedcollapse.addDiv('info_box_7', 'fade=1,height=200px')
    animatedcollapse.addDiv('info_box_8', 'fade=1,height=200px')
    To:
    Code:
    animatedcollapse.addDiv('info_box', 'fade=1,height=200px')
    animatedcollapse.addDiv('info_box_2', 'fade=1,height=200px,hide=1')
    animatedcollapse.addDiv('info_box_3', 'fade=1,height=200px,hide=1')
    animatedcollapse.addDiv('info_box_4', 'fade=1,height=200px,hide=1')
    animatedcollapse.addDiv('info_box_5', 'fade=1,height=200px,hide=1')
    animatedcollapse.addDiv('info_box_6', 'fade=1,height=200px,hide=1')
    animatedcollapse.addDiv('info_box_7', 'fade=1,height=200px,hide=1')
    animatedcollapse.addDiv('info_box_8', 'fade=1,height=200px,hide=1')
    Jeremy | jfein.net

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

    Default

    You can group the DIVs together when you initialize them, which causes one to collapse when another is expanded. For example:

    Code:
    animatedcollapse.addDiv('cat', 'fade=0,speed=400,group=pets')
    animatedcollapse.addDiv('dog', 'fade=0,speed=400,group=pets,persist=1,hide=1')
    animatedcollapse.addDiv('rabbit', 'fade=0,speed=400,group=pets,hide=1')
    Please see demo #2 on the script page for more info.

    BTW, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice: http://www.dynamicdrive.com/notice.htm
    DD Admin

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

    loganfisher` (01-29-2010)

  5. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Oh. Listen to him, not me.
    Jeremy | jfein.net

  6. The Following User Says Thank You to Nile For This Useful Post:

    loganfisher` (01-29-2010)

  7. #5
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Working Better

    Ok I am sorry I didnt realize that I had deleted it. It is back in there now.

    I got them to group and switch out but I would like the divs to come down from the top and not from the bottom like it is currently doing. I want the div to expand and contract on every button push. Now is this possible?

  8. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Hmm... That's going to be tough considering the 'toggle' height is from jQuery, and not from DD's code... Maybe ddadmin knows how to answer that...
    Jeremy | jfein.net

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
  •