Created
August 5, 2015 09:05
-
-
Save Ntropish/fd7835dab92c506a397a 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
$(document).ready(function() { | |
var i = 2; | |
setInterval(function() { | |
var setSearchBgimg = function setSearchBgimg(number) { | |
$(".search-bgimg").css("background", "url('/static/img/search-bgimg' + number + '.jpg')"); | |
} | |
$(".search-bgimg").hide(); | |
setSearchBgimg(i); | |
console.log('/static/img/search-bgimg' + i + '.jpg'); | |
$(".search-bgimg").fadeIn(); | |
i++; | |
if (i == 4) i = 1; | |
}, 5000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment