[英]jquery mobile popup dialog: Cannot read property 'is' of undefined
I am trying to open dialog box using jquery. 我正在尝试使用jquery打开对话框。 I have followed instruction using link: http://demos.jquerymobile.com/1.2.0/docs/pages/popup/index.html
我已按照说明使用链接: http : //demos.jquerymobile.com/1.2.0/docs/pages/popup/index.html
code looks like: Dialog 代码如下:对话框
<div data-role="popup" id="popupDialog" data-overlay-theme="a" data-theme="c" style="max-width:400px;" class="ui-corner-all">
<div data-role="header" data-theme="a" class="ui-corner-top">
<h1>Delete Page?</h1>
</div>
<div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
<h3 class="ui-title">Are you sure you want to delete this page?</h3>
<p>This action cannot be undone.</p>
<a href="#" data-role="button" data-inline="true" data-rel="back" data-theme="c">Cancel</a>
<a href="#" data-role="button" data-inline="true" data-rel="back" data-transition="flow" data-theme="b">Delete</a>
</div>
</div>
on jquery ready function, trying to open it through code: $("#popupDialog").popup(); 在jquery ready函数上,尝试通过以下代码打开它:$(“#popupDialog”)。popup(); $("#popupDialog").popup("open");
$(“#popupDialog”)。popup(“ open”);
Not sure what is wrong and can not find any help on this!!! 不知道出什么问题了,在此找不到任何帮助!!!
Open the popup on the jQM pageshow event not the jQuery ready event: 在jQM pageshow事件而不是jQuery ready事件上打开弹出窗口:
API: http://api.jquerymobile.com/1.3/pageshow/ API: http : //api.jquerymobile.com/1.3/pageshow/
$(document).on("pageshow","#page1", function(){
$("#popupDialog").popup("open");
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.