The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Image slider hlep
smtymagoo
post May 8 2012, 03:04 PM
Post #1





Group: Members
Posts: 3
Joined: 8-May 12
Member No.: 17,077



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>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
smtymagoo
post May 10 2012, 03:31 PM
Post #2





Group: Members
Posts: 3
Joined: 8-May 12
Member No.: 17,077



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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th April 2024 - 04:22 AM