View Full Version : RollOvers w/ imageswap and changing images without restore

Jun 19th, 2002, 07:58 PM
I have one page with four rollovers. I need to be able to keep the rollover effect until I click on one. A click will change the image to one that is supposed to stay until one of the other ones is clicked. Anyone have ideas on how to do this?

Jun 19th, 2002, 08:15 PM
I dont have any of the code I'e used as it didn't work. My conflict I can get past is the rollover restore is called on Onmouseout, the image swap is called on OnClick, how do I get the onmouseout to not restore the image when its mousedout

Jun 19th, 2002, 09:38 PM
Dont use the onmouseout event handler if you dont want anything to happen onmouseout.

Show us the code you have so far.

Jun 19th, 2002, 09:53 PM
I figured it out thnx.

This is what I was trying to do.


Notice the mouse overs, and when you click on one it no longer has a mouseover until a different nav image is clicked

Thnx for the effort though

Jun 19th, 2002, 10:08 PM
Were you just looking for a script ?
If so maybe this should have been posted in the "Request a Script Forum" :)

If you are developing your own I would suggest using a global variable that holds the value of the "clicked" image. In your mouseout code you would check this value and if it was the same as the image you were mousing out of you would do nothing.

However if you just want some demos I have a script that I have not yet had time to properly incorperate into my site but here are some examples of what it can do,

Image Sticks on Click (http://www.javascript-fx.com/post/codeforums/quadroll/QuadState2img.html)
Third image on click (http://www.javascript-fx.com/post/codeforums/quadroll/QuadState3img.html)
Third image on Click - 4th image on mouse out of clicked (http://www.javascript-fx.com/post/codeforums/quadroll/QuadState4img.html)
Same as above but using only 4 images (http://www.javascript-fx.com/post/codeforums/quadroll/QuadState4imgA.html)