Created
March 17, 2015 10:21
-
-
Save malachi358/d57fcf705bd01948709b to your computer and use it in GitHub Desktop.
Loop Words with fadeIn and fadeOut jQuery
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
var words = ["A", "B", "C", "D"]; | |
var showwords = function() { | |
var newword = words[Math.floor((Math.random() * words.length))] | |
$("#words").fadeOut( 1000, function() { | |
$("#words").text(newword).fadeIn(1000); | |
}); | |
} | |
setInterval(showwords, 3000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment