Jump to content

jQuery - Event that works all the time


KubeR

Recommended Posts

Hi,

I want to add a few checks to my website which will work all the time,I got all the code setted up.

but the only problem is that I didn't find any event which runs all the time.

I tried to use setInterval and setTimeout but setInterval didn't run the code and setTimeout works only once and don't repeat.

So I wonder,is there any more/other ways to run a code in a loop per second or millisecond ?

but won't affect the performance of the page(make it laggy/buggy and things)

 

 

 

 

Thanks in advance for any kind of help,

Greetings,

KubeR.

Link to comment
https://forums.phpfreaks.com/topic/282428-jquery-event-that-works-all-the-time/
Share on other sites

setInterval (or a recursive setTimeout) is how you run something on a specific frequency. When you say it didn't work it's most likely you were just doing something wrong in your code, they both work fine.

 

There may be a better way to do what you want, but we'd need more information detailing exactly what you want to do and how you want it done.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.