views:

41

answers:

1

anybody knows an easy way to display an alert after each 50 seconds in jquery (infinite loop)

+2  A: 

Use setInterval(), like this:

setInterval(function() {
 alert('hi!');
}, 50000);

Note this is just JavaScript, no jQuery library needed.

I assume you have a purpose, not actually alerting? :) Please let that be the case!

Nick Craver
:) no I just want to piss ppl off with alerts popping up all the time :D
Omu
@Omu - well played sir =P
Nick Craver
I am sure thats one site I would disable javascript on instantly... or just exit.
BerggreenDK