I have code for an image slider but I want to add a hyperlink to each image as it comes up. How would I do that with this code part of the code?
Thanks so much!!
<script type="text/javascript">
<!--
var image1=new Image()
image1.src="image1.jpg"
var image2=new Image()
image2.src="image2.jpg"
<img src="http://image1.jpg" name="slide" height="400" width="940">
<script>
<!--
//variable that will increment through the images
var step=1
function slideit(){
//if browser does not support the image object, exit.
if (!document.images)
return
document.images.slide.src=eval("image"+step+".src")
if (step<3)
step++
else
step=1
//call function "slideit()" every 2.5 seconds
setTimeout("slideit()",2500)
}
slideit()
//-->
</script>
could you help me re-write it so that the I can get the image to be a hyperlink? I'm completely new to html and this is the final piece to my site. Any help would be greatly appreciated. Thanks, so much
Should the URL of the link change everytime the image SRC changes? If so that's the labor intensive part.
If you just want a static link URL then it's simple to do.
Yes, I'd want each image to have it's own separate link.
Something like this then?
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)