开发者

Jquery automatic modal popup

开发者 https://www.devze.com 2023-02-06 04:20 出处:网络
HI, Does anyone know the example of jQuery pop up modal window where you can open automatically on page load and close it after 10 sec for example. Which support开发者_JAVA技巧s iframe integration. T

HI,

Does anyone know the example of jQuery pop up modal window where you can open automatically on page load and close it after 10 sec for example. Which support开发者_JAVA技巧s iframe integration. Thank you


The jQuery UI modal dialog will automatically open on page load if you declare no other parameters in its initialisation call:

$(function() {
    $( "#dialog" ).dialog();
});

To have the dialog close after a delay you should be able to include a call further down your DOM ready event:

setTimeout($('#dialog').dialog('close'), 10000);


not sure what are you trying to show in your pop up modal window, but you can try using fancybox which have a close function even from the iframe.

thus you can just set a timer function to run for ten seconds after the user clicks on it and close the window.

0

精彩评论

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