Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var img = [
- 'first.img',
- 'second.img',
- 'third.img'
- ];
- window.imgInterval = 0;
- setInterval(function() {
- var index = window.imgInterval % 3;
- $('.elem').css({
- backgroundImage: 'url(' + img[index] + ')'
- });
- }, 1000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement