PDA

View Full Version : Keep animated div open on click



grinnellja
08-03-2011, 06:49 PM
1) Script Title: Animated Collapsible DIV v2.4

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm#newattrs

3) Describe problem: I was wondering if there was a way to keep the div open when I click on it. I am using the div for a forgot password link. It opens, the user types their username and clicks submit then it refreshes and asks them a security question. I would like to know how, and if, I can keep that div open between messages, i.e. keep it open after a user clicks submit so that when it refreshes to the next question they don't have to reopen the div.

Thank you

ddadmin
08-04-2011, 08:21 AM
Have you tried enabling persistence in the initialization code of the script? ie:


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')

The code in red causes the "dog" DIV to remember and recall its state when the page is reloaded or revisited with a browser session.