I'm using the scriptaculous Toggle Slide effect, & use an image link (button) to toggle the box to slide down & up.
What I'd like to do it toggle the image link so when it's clicked it's replaced by a different image. Once it's clicked again it switches back to the original image.
Here is the code I'm using:
Code:
<a href="javascript:;" onclick="Effect.toggle('up-down','slide'); return false;"><img src="images/first-image.jpg" alt="toggle" /></a>
<div id="up-down" style="display: none;">
<p>'Content'</p>
</div>
And the other image I like to toggle between is:
"images/second-image.jpg"
Anyone know how I can do this? 
|