开发者

jquery/javascript alert popup on a set time

开发者 https://www.devze.com 2023-02-24 21:00 出处:网络
Do you know if there exists开发者_运维知识库 any Jquery plugin that displays an alert popup message every period of time, or one in a set period of time? For instance: your time expires in x minutes,

Do you know if there exists开发者_运维知识库 any Jquery plugin that displays an alert popup message every period of time, or one in a set period of time? For instance: your time expires in x minutes, the timeout being given.

Thank you!


Why plugin when there is a native window.setInterval javascript function?

window.setInterval(function() {
    // this will execute every 5 minutes => show the alert here
}, 300000);

Of course you could use a plugin to do sexier notifications rather than a boring alert.


You could try jQuery.Timeout, it should do what you need!

$.timeout(5000).done(function() { 
    alert("5 seconds later..."); 
});
0

精彩评论

暂无评论...
验证码 换一张
取 消