View Single Post
Old 04-27-2010, 08:03 PM   PM User | #1
Raunchola
New to the CF scene

 
Join Date: Apr 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Raunchola is an unknown quantity at this point
Smile Change image by onclick?

Hello!
I'm not skilled whatsoever in javascript, and therefore I'm turning to you guys. What I'm requesting is a javascript that makes an image (of a button) change into another image when I'm clicking on it. But then, I want it to return to its original image when I'm clicking on it twice.

Now, I've already found some scripts on google that shows me how to do this, however; I'm going to use two separate buttons, and on each of these buttons this onclick-image-change-effect is going to be applied (but they'll have different images both originally and after the onclick).

So:

Button 1: Image A -> Onclick -> Image B -> Onclick -> Image A
Button 2: Image C -> Onclick -> Image D -> Onclick -> Image C

I know it sounds kinda confusing, but I'm sure you guys understand what I mean! I'd be really grateful if some friendly soul could help me out with this since I'm not so skilled in javascript at all. Thanks in advance!

Last edited by Raunchola; 04-27-2010 at 08:06 PM..
Raunchola is offline   Reply With Quote