jQuery Mobile 1.4.x:如何在应用程序启动5秒后弹出一个弹出窗口

时间:2014-04-25 14:47:12

标签: jquery-mobile jquery-mobile-popup

我无法执行点击事件,因为在应用运行5秒后,弹出窗口就开始了。

有什么想法吗?

更新:

这是iFrame Popup示例。我刚刚从广告的来源改变了src。

问题是我需要在5秒钟后设置超时以使用弹出窗口,但是我对于超时功能将如何呈现弹出窗口感到困惑,因为我无法使用点击事件

<a href="#popupMap" data-rel="popup" data-position-to="window" class="ui-btn ui-corner-all ui-shadow ui-btn-inline">Open Map</a>
<div data-role="popup" id="popupMap" data-overlay-theme="a" data-theme="a" data-corners="false" data-tolerance="15,15">
    <a href="#" data-rel="back" class="ui-btn ui-btn-b ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
    <iframe src="http://googleadmobORadsense.com" width="480" height="320" seamless=""></iframe>
</div>

1 个答案:

答案 0 :(得分:0)

$(document).on("mobileinit", function () {
  setTimeout(function () {
    //show your popup here
  }, 5000);
});