View Full Version : image rollovers? (ASAP)
ModernRevolutions
03-24-2007, 01:10 AM
i need a code that when you hover over it, it changes to the other picture. yes its confusing to explain but i forgot what its callled.....um...anyone know a code for it. its like hover over image 1 and then it changes to image 2 and then when you take your mouse off it goes back to image 1. get it??? i need a code ASAP!
--thanks :]
thetestingsite
03-24-2007, 02:33 AM
Why not try something like this:
(Not valid HTML, but notice the onmouseover/out items.)
<img src="1.gif" onmouseover="this.src='2.gif';" onmouseout="this.src='1.gif';">
Simply change the parts in red to be your original image, and the part in blue to be the image to change to. Tested and works.
Hope this helps.
EDIT: Also, this is not just plain HTML, but instead has a little bit of Javascript involved.
djr33
03-24-2007, 04:49 AM
Google the code if you want a more complex script. They exist all over the place.
thetestingsite
03-24-2007, 04:51 AM
Google the code if you want a more complex script. They exist all over the place.
This is true, you may also want to look around the forums. There are several throughout the forums.
(sorry dj, had to throw that in there as well.)
djr33
03-24-2007, 05:13 AM
Oh, sure. But mouseovers are so common it won't be tough at all. Search "mouseover" or "rollover" anywhere (google, here, another forum, etc.) and you'll get plenty of variations on the scripts.
Nothing will be more simple than the above, though.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.