我有以下代码
在pageinit弹出窗口打开但它再次关闭。
我该怎么办才能留下来?
$(document).delegate("#pageone", "pageinit", function () {
alert("hi");
$("#popupdiv").trigger("click"); //openvipPopup is the id of the anchor for popup
});
使用
<div data-role="popup" id="popupDialog" style="max-width:400px;" class="ui-corner-all">
<div data-role="header" data-theme="a" class="ui-corner-top">
<h1>Solution Location</h1>
<a href="#" data-role="button" data-inline="true" data-rel="back" data-theme="b">Cancel</a>
<a href="#" data-role="button" data-inline="true" data-rel="back"
data-transition="flow" data-theme="b" id="setURL">Done</a>
</div>
<div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
<label for="name">Set URL</label>
<input type="text" name="solutionURL" id="solutionURL"
value="http://demo.iallways.com/iConfig" style="width:350px;" />
</div>
</div>
<a href="#popupDialog" data-rel="popup"
class="ui-btn ui-btn-inline ui-corner-all" data-position-to="window"
id="popupdiv"> Solution Location</a>