Created
July 8, 2014 12:46
-
-
Save jdcauley/9bf2ef3cc83491cda109 to your computer and use it in GitHub Desktop.
jQuery Text Loop
This file contains hidden or 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 headline = $("#headline"); | |
var copy = ['Entrepreneurs', 'Innovators', 'Industrialists', 'Disruptors']; | |
var position = -1; | |
!function loop() { | |
position = (position + 1) % copy.length; | |
headline.html(copy[position]) | |
.fadeIn(1000) | |
.delay(3000) | |
.fadeOut(1000, loop); | |
}(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment