jQuerybeast jQuerybeast -5 years ago 155
Javascript Question

jQuery: Find word and change every few seconds

How can I change a word every 2-3 seconds using jQuery?

For example:

I have this:

<span>This is so</span>

... and I want the awesome to change into cool,fantastic,incredible and keep cycling with loop using fadeOut/fadeIn effect maybe?

Is it possible?

Thanks alot

Answer Source

    // List your words here:
    var words = [
        ], i = 0;

       // 2 seconds
    }, 2000);


Give your span an id, and change changerificwordspanid to the id of the span.

JSFiddle Example here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download