PDA

View Full Version : Animated Collapsible DIV: Change link text based on DIV state



fingersoccer
08-17-2010, 06:02 PM
1) Script Title: Animated Collapsible DIV v2.4

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

3) Describe problem:
Is there a way to change the text of the Toggle link based on the state of the DIV? Specifically, I want the Toggle link to say 'Show Menu' when the DIV is collapsed and 'Hide Menu' when it's open.

Right now it looks like there's a feature to change the image of the button, but I would like to avoid that if possible. I only want to change the text of the link.

Any help is duly appreciated.

Beverleyh
08-17-2010, 06:24 PM
Right now it looks like there's a feature to change the image of the button, but I would like to avoid that if possible.Are you planning on using a static base image with overlaying text - the text being the part that changes while the button image behind it stays the same?

If you dont mind me asking, is there any particular reason why you wouldnt want to use the existing image switch? (if its a visual thing, you could always make text-look images)

fingersoccer
08-17-2010, 07:31 PM
Well, it will keep things simpler without extra images floating around my images folder. If you check out the Erudite Wordpress theme (http://erudite.somadesign.ca/), you can see what I mean.

vwphillips
08-19-2010, 11:22 AM
see attached