Jump to content

jQuery - Event that works all the time


Go to solution Solved by trq,

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.