SlideShow of Images while MouseOver using JavaScript

HI,

In this Java Script we can see how to see the images like slide show in a Mouse Over Operation.

Code Below the Header Tag



<script>
function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=//towhatimage.src
gotolink=//url here
}
}
function Slide(){
window.location=gotolink
}

</script>
<script language="JavaScript" type="text/Jscript">
var myimages=new Array()
var gotolink="#"

function preloadimages(){
for (i=0;imyimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}


preloadimages("Image1.gif","Image2.gif","Image3.gif","Image4.gif","Image5.gif")
</script>


You can set the images which you need to Roll Over(Order):

preloadimages("Image1.gif","Image2.gif","Image3.gif","Image4.gif","Image5.gif")



Now Insert this Function in Html Coding:



<a href="javascript:Slide()"><img src="Image2.gif" name="targetimage" border=0></a>
//you can set the Images here which you to show first in src


Finally this Script should called to MouseOver Func



<a href="b2.htm" onMouseover="changeimage(myimages[0],this.href)">Image 1</a>


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: