【发布时间】:2012-10-23 21:12:56
【问题描述】:
我已经定义了弹出 div,我想在某些事件上打开,而不是使用 href。我已经定义了弹出 div 像:
<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>Sample Page</h1>
</div>
<div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
<a href="#" data-role="button" data-inline="true" data-rel="back" data-theme="c">OK</a>
</div>
</div>
我尝试调用这个弹出 div
$("#popupDialog").popup;
$("#popupDialog").popup();
$("#popupDialog").popup("open");
它们都不起作用。任何建议。
【问题讨论】:
-
需要查看应该调用弹出窗口的标记,通常是通过 href ,但应该可以使用 $.mobile.changePage,但如果没有那个标记/脚本,我会随风飘扬
-
我想在表单提交等验证中显示弹出消息