javascript - How to register setInterval without the delay without using any function as I need it to run 1st time -
var interval = setinterval(function(){alert("i alive.")},delay)
i want register setinterval explicitly want run interval after every delay time if page in have written destroyed. works fine if delay 5 minutes , wait till setinterval registered first time if change page alerts. if change page before delay time dont alert never registered @ all. there way can directly register setinterval load page.
have tried putting document ready? when page loads itll run straight away;
var interval; $(document).ready(function) { interval = setinterval(function(){alert("i alive.")},delay); });
Comments
Post a Comment