Skip to content

Instantly share code, notes, and snippets.

@grippado
Last active October 2, 2015 19:38
Show Gist options
  • Select an option

  • Save grippado/2306639 to your computer and use it in GitHub Desktop.

Select an option

Save grippado/2306639 to your computer and use it in GitHub Desktop.
AutosliderJS
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<html>
<head>
<script type="text/javascript">
<!--
var img1=new Image()
img1.src="city.svg"
var img2=new Image()
img2.src="monument.svg"
</script>
</head>
<body>
<img src="city.jpg" name="carousel" width="500" height="500" />
<script>
<!--
var step=1
function slideit(){
if (!document.images)
return
document.images.carousel.src=eval("img"+step+".src")
if (step<2)
step++
else
step=1
setTimeout("slideit()",2500)
}
slideit()
//-->
</script>
</body>
</html>
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment