jQuery BlockUI Plugin Demo 5(Simple Modal Dialog Example)
Simple Modal Dialog Example
This page demonstrates how to display a simple modal dialog. The button below will invoke blockUI with 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 5(Simple Modal Dialog Example)的更多相关文章
- jQuery BlockUI Plugin Demo 6(Options)
Options BlockUI's default options look (exactly) like this: // override these in your code to change ...
- jQuery BlockUI Plugin Demo 3(Page Blocking Examples)
This page demonstrates several ways to block the page. Each button below activates blockUI and then ...
- jQuery BlockUI Plugin Demo 4(Element Blocking Examples)
Element Blocking Examples This page demonstrates how to block selected elements on the page rather t ...
- jQuery BlockUI Plugin Demo 2
Overview The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without l ...
- jQuery BlockUI Plugin Demo
1.Login Form $(document).ready(function() { $('#demo1').click(function() { $.blockUI({ message: $('# ...
- jquery.ui.accordion的修改(支持展开多个)
原文:jquery.ui.accordion的修改(支持展开多个) 背景:原jquery.ui.accordion插件,最多只能展开一个,不能展开多个,后来在网上找到了一个基于它的一个修改版(http ...
- Jquery实现数据双向绑定(赋值和取值),类似AngularJS
<!DOCTYPE html> <html> <head> <meta name="viewport" content="wid ...
- PHP设计模式(一)简单工厂模式 (Simple Factory For PHP)
最近天气变化无常,身为程序猿的寡人!~终究难耐天气的挑战,病倒了,果然,程序猿还需多保养自己的身体,有句话这么说:一生只有两件事能报复你:不够努力的辜负和过度消耗身体的后患.话不多说,开始吧. 一.什 ...
- jQuery 滚动条 滚动到底部(下拉到底部) 加载数据(触发事件、处理逻辑)、分页加载数据
1.针对浏览器整个窗口滚动 主要代码: <script type="text/javascript"> ; function GetProductListPageFun ...
随机推荐
- VueRouter基础
安装 直接下载(官方CDN) https://unpkg.com/vue-router/...通过页面script标签引入,如下: <script src='https://unpkg.com/ ...
- jquery限定文字超出用省略号
都知道用css3可以做到一行超出显示省略号,但多行的用css3很麻烦还要考虑兼容,今天用jquery判断字数来限制出现省略号 $(".ftlt_lt_wzne").each(fun ...
- LightOJ - 1078-Integer Divisibility(同余)
链接: https://vjudge.net/problem/LightOJ-1078 题意: If an integer is not divisible by 2 or 5, some multi ...
- [NgRx] NgRx Runtime Checks
Turn on runtime check: @NgModule({ declarations: [AppComponent], imports: [ ..., StoreModule.forRoot ...
- MongoDB 副本集节点添加与删除
replica set多服务器主从,添加,删除节点,肯定会经常遇到的.下面详细说明一下,添加,删除节点的2种方法. 一,利用rs.reconfig,来添加,删除节点 1,添加节点 查看复制打印 rep ...
- SQL Server全文检索
SQL Server 全文索引的硬伤 http://www.cnblogs.com/gaizai/archive/2010/05/13/1733857.html SQLSERVER全文搜索 http: ...
- bootstrap中tab切换的使用
文档地址:https://v3.bootcss.com/javascript/#tabs 简单实例: <!DOCTYPE html> <html lang="en" ...
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory'
spring整合mybatis的时候,传统dao模式test报错 发现是在pojo类user对应的user.xml中配置路径写错了 org.springframework.beans.factory. ...
- ZR#959
ZR#959 解法: 对于一个询问,设路径 $ (u, v) $ 经过的所有边的 $ gcd $ 为 $ g $,这可以倍增求出. 考虑 $ g $ 的所有质因子 $ p_1, p_2, \cdots ...
- 小程序 之嵌套循环修改index与item
<block wx:for="{{menu}}" wx:key="index"> <view class="cate-item {{ ...