How can I change a word every 2-3 seconds using jQuery?
For example:
I have this:
This is so
<
You can easily do this using setInterval and few lines of code.
Working demo
var keywords = ["awesome", "cool", "fantastic", "incredible"];
var count = 1;
setInterval(function(){
$("span.keyword").fadeOut(400, function(){
$(this).html(keywords[count]);
count++;
if(count == keywords.length)
count = 0;
$(this).fadeIn(400);
});
}, 2000);