tags:

views:

35

answers:

1

How would i create a jquery timer that starts when a link is 'mouse-overed', Displays a 1,2,3, 4 and 5, one after the other. Then on 5 pops up a login box?

Cheers.

+4  A: 

How about:

var counter = 0;
var interval = setInterval(function() {
    counter++;
    // Display 'counter' wherever you want to display it.
    if (counter == 5) {
        // Display a login box
        clearInterval(counter);
    }
}, 1000);
VoteyDisciple
nice concise answer - added countdown and working demo - http://jsbin.com/igoxo/3/
Dr. Frankenstein
Nice one mate!! Thank You!!
Tapha