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.
http://jsfiddle.net/brynner/Lhm1ydvs/
HTML
JS
function c(){ var n=$('.c').attr('id'); var c=n; $('.c').text(c); setInterval(function(){ c--; if(c>=0){ $('.c').text(c); } if(c==0){ $('.c').text(n); } },1000); } // Start c(); // Loop setInterval(function(){ c(); },5000);