Last active
October 2, 2015 19:38
-
-
Save grippado/2306639 to your computer and use it in GitHub Desktop.
AutosliderJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment