Created
May 26, 2014 13:45
-
-
Save andredelgado/9592b4833e75407d932b 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
$(function() { | |
var newBg = ['wp-content/themes/movein3Theme/img/slider1.jpg', 'wp-content/themes/movein3Theme/img/slider2.jpg', 'wp-content/themes/movein3Theme/img/slider3.jpg']; | |
var i = -1; | |
var rotateBg = setInterval(function(){ | |
if(i==3) | |
i = 1; | |
else | |
i++; | |
$('#slider').css({backgroundImage : 'url(' + newBg[i] + ')'}); | |
}, 5000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment