PDA

View Full Version : Animated Collapsible DIV - Integrating Plus and Minus Images



tauneutrino
07-16-2008, 10:36 PM
1) Script Title: Animated Collapsible DIV v2.01

2) Script URL (on DD):

http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm

3) Describe problem:

I have a plus and minus image I want to use to facilitate the div open/close; however, I am unable to connect/associate the +/- behavior by clicking on the link. Translation: I am interested in having the - change to + when someone clicks on the link, and from + to - when they click on the link again.

Here's what my code looks like now:

<a href="javascript:animatedcollapse.toggle('001')"><img src="../template_images/minus.png" border="0" onclick="this.src=(document.getElementById('001').style.display!='none')?'../template_images/minus.png':'../template_images/plus.png';" />Link</a>

Your help is much appreciated!

ddadmin
07-17-2008, 07:35 AM
There's no easy way to add indicators that change depending on a collapsible DIV's state unfortunately. It's something I plan to add when the script is updated again. In the meantime, Accordion Content script (http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm) does support this.

lolka_bolka
11-17-2008, 12:46 PM
As i see, you promised, you will build in this function.
As i see, since 2008 july you didn't do that :)

Can we count on this?
Thx, and anyway the script is very good.

I tried to see trough what happend, but i can not catch the action. If i toogle, the action will always 'toogle' so i never know is it opened, or closed.

EDIT: miss spelled the date.