Looking for code: img that changes img on mouseover
i used to use:
<IMG SRC="main.jpg" BORDER=0 NAME="pic1">
im confused its been awhile...
all i want is a img to change to diff img on mouse over as a link as well!
I personnaly use jquery.
<a href="http://www.cnn.com" id="main">
<img src="first.jpg" border=0 name="pic1" id="mainpic">
Try do this
Originally Posted by Oppression
<img src="/image.jpg" width="150" height="100" name="image_name"
that makes sense.
I will try that!
<img src="image1.gif" onmouseover="this.src='image2.gif'" onmouseout="this.src='image1.gif'" style="width: XXXpx; height: YYYpx;" alt="" />
For so far I know, best practices recomend placing js code at bottom of page and not within your html.
c.f. point 5:
thanks a ton you guys!
i hope one day i can help others with their problems too. its been way too long since i did any scripting / coding etc
i highly would recomend these forums.. everyone seems so patient and helpful, i love it.
i tried the jqueury script
it gave me a 'to help protect your security I.E has prevented scripts etc etc etc pop up' at the top..
i'd rather not use scripts id rather use css or html, as i heard many people will not activate the script. for security purposes. i need raw html. / css.
<img src="image.jpg" width="32" height="33" name="test"
simply changes the size..... i have 2 images 1 for reg 1 for hover (link)
Originally Posted by Major Payne
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)