Results 1 to 3 of 3

Thread: Animated Collapsible Div

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

    Default Animated Collapsible Div

    1) Script Title: Animated Collapsible Div v2.4

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

    3) Describe problem: I really like this script, however is there a way to alter it so that i dont have to define each of the div's that will be using this script? the reason i ask is that my divs are different each time, and are defined by the database results that the user pulls from a search. and if i define each possible one [from 4 to 40 div's on a results page], but not every one shows [based on the amount of results], then it gives errors.

    i am using collapsible div's as there is alot of different info that the results bring back that i want to hide until the user wants to see it

    i am currently using a different more simple 'script', but has no animation, and is quite clunky, especially to code it

    each div is defined in a normal javascript that looks something like animatedcollapse.addDiv('rabbit', 'fade=1'), if i could avoid having to use that, it would be awesome.

    i did find a script that avoids this issue [harrymaughans.com], but bought up another issue of having to define each div's height, but i need dynamic height setting as with this one here

    sorry for the novel, please help

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

    Default

    If I understand you correctly, inside the HEAD section of your page you have initialized some DIVs that don't exist on the page, ie:

    Code:
    animatedcollapse.addDiv('edward', 'fade=1,height=120px')
    So in the above case, the DIV with "edward" on the page doesn't actually exist. Is that right? If so, that in itself shouldn't cause the script to throw an error. Please post a link to the page on your site that contains the problematic script so we can check it out.
    DD Admin

  3. #3
    Join Date
    Mar 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Please ingore this thread. i think i had a bit too much coffee in me when doing this at work, all good and fine

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
  •