I want a jquery timer like setTimeout/setinterval to call a function repeatedly for every particular no. of seconds. I have tried both. But it call only once.
I want a jquery timer like setTimeout/setinterval to call a function repeatedly for every
Share
setTimeout is called only once after the elapsed time whereas setInterval is called repeatedly. For example if you want to invoke some function every 5 seconds:
It doesn’t require any plugins, it is pure javascript. Even if there were jQuery plugins they would eventually use
setTimeout/setInterval.