admin管理员组文章数量:1291031
I want a dialog box to appear when an error occurs however I dont know how to do it. Where I would like the code to appear can be seen in the code below. So when this function is called a popup dialog box appears.
.fail(function(){
alert("$.get failed!"); //replace with failed dialog
})
});
I want a dialog box to appear when an error occurs however I dont know how to do it. Where I would like the code to appear can be seen in the code below. So when this function is called a popup dialog box appears.
.fail(function(){
alert("$.get failed!"); //replace with failed dialog
})
});
1 Answer
Reset to default 8So I'm guessing this is what you are talking about.
http://api.jquerymobile./popup/
Have this embedded in your html somewhere.
<div data-role="popup" id="popupCloseLeft" class="ui-content" style="max-width:280px">
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-left">Close</a>
<p>I have a close button at the top left corner with simple HTML markup.</p>
</div>
And then in your fail function just call this.
$( "#popupCloseLeft" ).popup("open");
本文标签: javascriptCreating a popup dialog when an error occurs Jquery MobileStack Overflow
版权声明:本文标题:javascript - Creating a popup dialog when an error occurs Jquery Mobile - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741509262a2382510.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论