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 ...
随机推荐
- 全球化 System.Globalization.CultureInfo与RegionInfo类
一.CultureInfo类:文化信息 分类: 1.中立文化(Neutral culture): zh-CHS:中文,无区域信息,无格式化信息 2.特定区域文化(Specific culture) z ...
- Git----查看提交日志
Git log 只包括当前分支的commit. 截图示例: Git reflog 显示整个本地仓储的commit(所有branch,包括已撤销的commit) 截图示例: Git reflog --r ...
- 利用Python读取和修改Excel文件(包括xls文件和xlsx文件)——基于xlrd、xlwt和openpyxl模块
https://blog.csdn.net/sinat_28576553/article/details/81275650#4.4%C2%A0%E4%BF%9D%E5%AD%98%E5%B7%A5%E ...
- 多任务创建-线程(IO密集型适用)
单核CPU:时间片轮转 并行:CPU的个数大于等于任务数 真的多任务执行 并发:CPU的个数小于任务数 假的多任务 知识点: 多线程共享全局变量 创建线程的两种方法: 1.创建子线程方法 调用函数 T ...
- sql server 变量和select 赋值的联合使用demo
) ) select @cltcode=cltcode,@brand=brand from prosamplehd CREATE table #t ( cltcode ), brand ) ) INS ...
- 当margin和padding的值是百分比时,如何计算
对元素的margin设置百分数时,百分数是相对于自身包含块的width计算(包含块传送门),不管是margin-top/margin-bottom还是margin-left/margin-right. ...
- leetcode解题报告(18):Contains Duplicate
描述 Given an array of integers, find if the array contains any duplicates. Your function should retur ...
- spring boot 对某个接口进行次数限制,防刷。简易版。demo。
一般的项目 如果没有做防刷 容易被人爆接口 或者就是说没有做token防刷过滤. 容易被人用正常的token刷接口.有些token非一次性. 用户登录之后生成token会有一个过期时间,但一般没有做频 ...
- List集合类
1.1: List.add方法——向集合列表中添加对象 public static void main(String[] args) { List<String> list=new Ar ...
- CF516D Drazil and Morning Exercise【并查集,结论】
题目描述:一棵\(n\)个点的树,设\(d(u)=\max_{v\in V}\text{dis}(u,v)\),每次询问一个数\(l\),求一个最大的联通子图\(L\),使得\(\forall u,v ...