View Full Version : Animated Collapsible DIV v2.4 - Toggle icon «before» slide animation

02-13-2011, 12:49 PM
1) Script Title: Animated Collapsible DIV v2.4

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

3) Describe problem: When using the toggle-image functionality, this icon-image toggles «after» the DIV finishes the sliding operation. Is it possible to toggle the icon-image «before» the sliding operation?

[additional context: in a web-project for children, the icon-image is a leaver that has «up» and «down» positions, and when toggled it shows/hides a DIV with cartoons. At the moment, the lever only moves to the down position «after» the sliding animation is done and it would be fantastic to move it «before» the animation performs. For the moment, I´m using a very fast opening speed so that the toggle-image and the DIV-opening seem to occur at near the same time, but the great solution would be to be able to toggle the icon «before» the animation].

Thanks for any help!
Best regards

02-15-2011, 02:33 AM
Sure, try the below modified .js file, which should do the trick.