-
-
Save neton-bricio/a55752d2b3ddcf7eca66e2dde9021933 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset='UTF-8'> | |
<title>Simple jQuery Slideshow</title> | |
<style> | |
#slideshow { | |
margin: 80px auto; | |
position: relative; | |
width: 160px; | |
height: 600px; | |
padding: 10px; | |
box-shadow: 0 0 20px rgba(0,0,0,0.4); | |
} | |
#slideshow > div { | |
position: absolute; | |
top: 10px; | |
left: 10px; | |
right: 10px; | |
bottom: 10px; | |
} | |
</style> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> | |
<script> | |
$(function() { | |
$("#slideshow > div:gt(0)").hide(); | |
setInterval(function() { | |
$('#slideshow > div:first') | |
.fadeOut(1000) | |
.next() | |
.fadeIn(1000) | |
.end() | |
.appendTo('#slideshow'); | |
}, 3000); | |
}); | |
</script> | |
</head> | |
<body> | |
<div id="slideshow"> | |
<div> | |
<img src="http://nblabs.tk/cerrado/ADS/img/0.jpg"> | |
</div> | |
<div> | |
<img src="http://nblabs.tk/cerrado/ADS/img/1.jpg"> | |
</div> | |
<div> | |
<img src="http://nblabs.tk/cerrado/ADS/img/2.jpg"> | |
</div> | |
<div> | |
<img src="http://nblabs.tk/cerrado/ADS/img/3.jpg"> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment