Advanced Search

Results 1 to 3 of 3

Thread: Animated Collapsible DIV - Collapsible DIVs inside collapsible DIV

  1. #1
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Animated Collapsible DIV - Collapsible DIVs inside collapsible DIV

    1) Script Title: Animated Collapsible DIV

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

    3) Describe problem:

    I'd like to have 2 or more collapsible DIVs inside another collapsible DIV. Is there a way to make the height of the containing DIV change based on the height of the DIVs inside? Ideally I'd like the containing DIV to grow and contract with the DIVs inside. Is that possible?

    If not is there a way to find the total expanded height and use that even if most (if not all) of the DIVs inside start collapsed?

    IE defalts to the height based on the state of collapse. Firefox defalts to a height that is based on all DIVs being expanded regardless of whether it is set that way or not.

    I am very new to javascript and any help would be greatly appreciated.

    Thanks

  2. #2
    Join Date
    Aug 2004
    Posts
    9,863
    Thanks
    3
    Thanked 960 Times in 949 Posts
    Blog Entries
    15

  3. #3
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply but I don't think this is really what I'm looking for.

    I don't know much of a better way to describe what I'm trying to do. I made an example and put it in a rar.

    http://www.snapdrive.net/files/391111/collapse.rar

    If you open it in explorer the containing DIV's height is set to the height of the other DIVs based on their up/down state. Firefox sets the height to the max down.

    Is there a way to have the height of the main DIV change as you open and close the other DIVs?

    I changed the script so the class changes on up/down. I made a crappy arrow for this but you can easily make something much nicer. This is the first script I've tried to change so it is very possible what I've done won't work for eveyone but I've had no problems with it and thought it could help someone.

    Any help appreciated.

    Thanks


    Quote Originally Posted by ddadmin View Post

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
  •