Results 1 to 3 of 3

Thread: A BUG in 'Animated Collapsible DIV' script

  1. #1
    Join Date
    Mar 2008
    Location
    Hrvatska (Croatia)
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation A BUG in 'Animated Collapsible DIV' script

    1) Script Title: Animated Collapsible DIV

    2) Script URL (on DD):

    http://www.dynamicdrive.com/dynamici...edcollapse.htm

    3) Describe problem:

    If:

    - The height attribute IS set manually
    - the persistexpand parameter IS set to 'true' (use cookies)
    - initstate parameter IS NOT used (so the initstate is 'contract')

    the target DIV would always be expanded at the very first visit (although it shoudn't be).

    The solution:

    The 21st line of the JavaScript:

    else if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes" && this.isExpanded!="")

    should be changed to

    else if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes")

    for after the very first visit, this.isExpanded!="" will always be false (cookie still doesn't exist --> animatedcollapse.getCookie returns ""), so the statement this.divObj.style.height=0 is never going to be processed (as it should).

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

    Default

    Thanks, I'll revisit this thread the next time the script is updated to see if the fix should be thrown in.

  3. #3
    Join Date
    Mar 2008
    Location
    Hrvatska (Croatia)
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    I think it should :-)

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
  •