Created
April 30, 2016 06:13
-
-
Save romreed/bf6260a855f64ee8dc4682fc0ac4605c to your computer and use it in GitHub Desktop.
Section bg color cycling
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
// Section bg color cycling | |
$('.animated-bg').each(function(){ | |
var $this = $(this), | |
colors = ['#ec008c', '#00bcc3', '#5fb26a', '#fc7331']; | |
setInterval(function(){ | |
var color = colors.shift(); | |
colors.push(color); | |
$this.animate({backgroundColor: color}, 2000); | |
},4000); | |
}); | |
<div id="footerwrap" class="purple animated-bg stopsticky" style="background-color: rgb(236, 0, 140);"> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this code working? i'm tried it but it wouldn't work. have a look of it
https://codepen.io/shamim539/pen/zwwWGW