简体   繁体   English

jQuery移动弹出对话框:无法读取未定义的属性“ is”

[英]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”);

getting error 出错

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");
});  

DEMO 演示

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法读取 jquery 中未定义的属性“0” - Cannot read property '0' of undefined in jquery SuiteScript无法读取未定义的属性“对话框” - SuiteScript Cannot read property 'Dialog' of undefined 在关闭对话框中:“无法读取未定义的属性&#39;getTargets&#39;” - On Closing Dialog: “Cannot read property 'getTargets' of undefined” 无法在angular mobile中读取未定义的属性&#39;makeCurrent&#39; - Cannot read property 'makeCurrent' of undefined in angular mobile 在页面上初始化jquery移动窗口小部件将显示“无法读取未定义的属性&#39;jQuery…&#39;” - Initializing a jquery mobile widget on a page gives “Cannot read property 'jQuery…' of undefined” jquery.mobile 1.4.5 未捕获的类型错误:无法读取未定义的属性“concat” - jquery.mobile 1.4.5 Uncaught TypeError: Cannot read property 'concat' of undefined jQuery mobile:未捕获的TypeError:无法读取ajax调用中未定义错误的属性“ abort” - jquery mobile : Uncaught TypeError: Cannot read property 'abort' of undefined error in ajax call jQuery扩展,无法读取未定义的属性 - jQuery extend, cannot read property of undefined jQuery:无法读取未定义的属性“ addClass” - Jquery: Cannot read property 'addClass' of undefined TypeError:无法读取未定义jQuery的属性“ top” - TypeError: Cannot read property 'top' of undefined jQuery
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM