my links on my site are not text, they are pictures. is there a way to make the pictures change to a different one by hovering over? thanks
if you want to see, its the ';home, wassup, videos, comments'; buttons on the top on this site
www.gangstacardtricks.co.nrHow do I make a link change to a different picture when hovered over?
If you have access to the HTML code, add a wee JavaScript event callback for the ';onMouseOver'; event on the image....
Try this
%26lt;script language=';javascript'; type=';text/javascript';%26gt;
var ImgNo = 0 ;
var ImgNames = new Array ( ';flora/flora_00.gif';, ';flora/flora_01.gif';, ';flora/flora_02.gif';, ';flora/flora_04.gif';, ';flora/flora_05.gif'; ) ;
function newImg () {
var e = document.getElementById ( ';myimg'; ) ;
ImgNo++ ;
if (ImgNo %26gt; 4) ImgNo = 0 ;
e.outerHTML = '%26lt;img id=';myimg'; border=';0'; onmouseover=';newImg()'; src=';' + ImgNames[ImgNo] + '';%26gt;'
}
%26lt;/script%26gt;
%26lt;/head%26gt;
%26lt;body%26gt;
%26lt;p%26gt;%26lt;img id=';myimg'; border=';0'; onmouseover=';newImg()'; src=';flora/flora_00.gif';%26gt;%26lt;/p%26gt;
%26lt;/body%26gt;
%26lt;/html%26gt;How do I make a link change to a different picture when hovered over?
it depend on if you are using code or a web editor tool
Subscribe to:
Post Comments
(Atom)
No comments:
Post a Comment