I’m trying to create an animation for text on a page that, every few seconds, changes one word out with another word from a list. Example: I have a header that says, “This is cool,” but I want “cool” to be replaced every few seconds by “neat/awesome/groovy/etc”.
I’m honestly not sure the best way to go about this (in terms of what technology to use) and I can’t find a blurb of code that works with modern browsers. Help is greatly appreciated!
In jQuery, I’d do something like this:
http://jsfiddle.net/6SRaB/1/
The key is to use a SPAN tag with an ID that you can pick out quickly.