To refresh a function after a particular time interval to refresh the values on the page.
We can do this by using setInterval() function on page load.
Write the below code where refresh() function will be the function that you want to refresh every 1 minute.
$(function(){
setInterval(function() {
refresh();
}, 1000 * 60 * 1);
});
Hope this will help you :)
0 Comment(s)