-
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).
-
-
Thanks, I'll revisit this thread the next time the script is updated to see if the fix should be thrown in.
-
-
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks