Template:Team:IBB Pune/slideshow

From 2009.igem.org

(Difference between revisions)
(New page: <html><script language="JavaScript1.1"> <!-- - JavaScript Image slideshow: By JavaScript Kit (www.javascriptkit.com) Over 200+ free JavaScript here!: var slideimages=new Array() var s...)
Line 1: Line 1:
-
<html><script language="JavaScript1.1">
+
<html><a href="javascript:gotoshow()"><img src="food1.jpg" name="slide" border=0 width=300 height=375></a>
 +
<script>
<!--
<!--
-
/*
+
//configure the paths of the images, plus corresponding target links
-
JavaScript Image slideshow:
+
slideshowimages("food1.jpg","food2.jpg","food3.jpg","food4.jpg","food5.jpg")
-
By JavaScript Kit (www.javascriptkit.com)
+
slideshowlinks("http://food.epicurious.com/run/recipe/view?id=13285","http://food.epicurious.com/run/recipe/view?id=10092","http://food.epicurious.com/run/recipe/view?id=100975","http://food.epicurious.com/run/recipe/view?id=2876","http://food.epicurious.com/run/recipe/view?id=20010")
-
Over 200+ free JavaScript here!
+
-
*/
+
-
var slideimages=new Array()
+
//configure the speed of the slideshow, in miliseconds
-
var slidelinks=new Array()
+
var slideshowspeed=2000
-
function slideshowimages(){
+
-
for (i=0;i<slideshowimages.arguments.length;i++){
+
-
slideimages[i]=new Image()
+
-
slideimages[i].src=slideshowimages.arguments[i]
+
-
}
+
-
}
+
-
 
+
-
function slideshowlinks(){
+
-
for (i=0;i<slideshowlinks.arguments.length;i++)
+
-
slidelinks[i]=slideshowlinks.arguments[i]
+
-
}
+
-
function gotoshow(){
+
var whichlink=0
-
if (!window.winslide||winslide.closed)
+
var whichimage=0
-
winslide=window.open(slidelinks[whichlink])
+
function slideit(){
 +
if (!document.images)
 +
return
 +
document.images.slide.src=slideimages[whichimage].src
 +
whichlink=whichimage
 +
if (whichimage<slideimages.length-1)
 +
whichimage++
else
else
-
winslide.location=slidelinks[whichlink]
+
whichimage=0
-
winslide.focus()
+
setTimeout("slideit()",slideshowspeed)
}
}
 +
slideit()
//-->
//-->
</script>
</script>
-
</html>
+
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
 +
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
 +
Kit</a></font></p></html>

Revision as of 10:20, 7 July 2009

This free script provided by
JavaScript Kit