jQuery BlockUI Plugin Demo 5(Simple Modal Dialog Example)
2015-02-02 14:30
441 查看
Simple Modal Dialog Example
This page demonstrates how to display a simple modal dialog. The button below will invokeblockUIwith a custom message. Depending upon the user response (yes or no) an ajax call will be made while keeping the UI blocked.
The following code is used on this page:
<script type="text/javascript"> $(document).ready(function() { $('#test').click(function() { $.blockUI({ message: $('#question'), css: { width: '275px' } }); }); $('#yes').click(function() { // update the block message $.blockUI({ message: "<h1>Remote call in progress...</h1>" }); $.ajax({ url: 'wait.php', cache: false, complete: function() { // unblock when remote call returns $.unblockUI(); } }); }); $('#no').click(function() { $.unblockUI(); return false; }); }); </script> ... <input id="test" type="submit" value="Show Dialog" /> ... <div id="question" style="display:none; cursor: default"> <h1>Would you like to contine?.</h1> <input type="button" id="yes" value="Yes" /> <input type="button" id="no" value="No" /> </div>
For full-featured modal dialog support, check out Simple Modal by Eric Martin or jqModal by Brice Burgess.
参考:http://malsup.com/jquery/block/#overview
相关文章推荐
- jQuery BlockUI Plugin Demo 4(Element Blocking Examples)
- [转]jQuery UI Dialog Modal Popup Yes No Confirm example in ASP.Net
- jQuery BlockUI Plugin Demo 2
- jQuery BlockUI Plugin Demo 3(Page Blocking Examples)
- jQuery BlockUI Plugin Demo
- jQuery BlockUI Plugin Demo 6(Options)
- jquery blockUI 扩展插件 Dialog
- iframe中的jquery ui modal dialog 覆盖父窗口
- jQuery BlockUI Plugin加载插件
- jquery插件:jQuery BlockUI Plugin(http://www.malsup.com/jquery/block/#demos)
- jquery blockUI 扩展插件 Dialog
- jQuery UI Dialog:Demo-2:实用技巧
- How to use jquery plugin jquery.blockUI.js?
- jQuery BlockUI Plugin
- jQuery-ui modal dialog
- JQuery UI dialog Demo
- jquery ui dialog 1.81的modal模式在ie中有水平滚动条!是bug吗?
- jQueryUI modal dialog does not show close button (x) JQueryUI和BootStrap混用时候,右上角关闭按钮显示不出图标的解决办法
- Jquery UI Dialog Demo
- jQuery UI Dialog:Demo-1:入门