Created
August 23, 2010 17:24
-
-
Save srobbin/545916 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
var position = 0, | |
images = [ | |
'image1.jpg', | |
'image2.jpg', | |
'image3.jpg' | |
]; | |
$.backstretch(images[position]); | |
setInterval(function() { | |
if(position++ > images.length) position = 0; | |
$("#backstretch img").attr("src", images[position]); | |
$(window).trigger("resize"); | |
}, 5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello guys i'm new here and i just HAD to post my working solution.
You will be needing http://plugins.jquery.com/project/timers too.