jQuery BlockUI Plugin Demo 2

Overview

The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAXwithout locking the browser[1]. When activated, it will prevent user activity with the page (or part of the page) until it is deactivated. BlockUI adds elements to the DOM to give it both the appearance and behavior of blocking user interaction.

//Usage is very simple; to block user activity for the page:
$.blockUI();

//Blocking with a custom message:
$.blockUI({ message: ‘<h1><img src="busy.gif" /> Just a moment...</h1>‘ });

//Blocking with custom style:
$.blockUI({ css: { backgroundColor: ‘#f00‘, color: ‘#fff‘} });

//To unblock the page:
$.unblockUI();

//If you want to use the default settings and have the UI blocked for all ajax requests, it‘s as easy as this:
$(document).ajaxStart($.blockUI).ajaxStop($.unblockUI);

参考:http://malsup.com/jquery/block/#overview

时间: 2024-10-10 20:22:47

jQuery BlockUI Plugin Demo 2的相关文章

jQuery BlockUI Plugin Demo

1.Login Form $(document).ready(function() { $('#demo1').click(function() { $.blockUI({ message: $('#loginForm') }); setTimeout($.unblockUI, 2000); }); }); 2.iPhoto (ish) $(document).ready(function() { $('#demo2').click(function() { $.blockUI({ css: {

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.

jQuery BlockUI Plugin Demo 3(Page Blocking Examples)

This page demonstrates several ways to block the page. Each button below activates blockUI and then makes a remote call to the server. The following code is used on this page: <script type="text/javascript"> // unblock when ajax activity s

如何写一个Jquery 的Plugin插件

博客分类: Javascript /Jquery / Bootstrap / Web jQuery配置管理脚本FirebugJavaScript JQuery Plugin插件,如果大家不明白什么是JQuery插件或都不清楚如何编写可以查看其官方的网站:jQuery Authoring Guidelines 好了,下面有一些我觉得想做一个好的插件必须应有的要求: 1.在JQuery命名空间下声明只声明一个单独的名称 2.接受options参数,以便控制插件的行为 3.暴露插件的默认设置 ,以便外

jQuery Media Plugin

jQuery Media 简介 Jquery Media Plugin是一款页面内容嵌套多媒体的插件.支持的大部分的多媒体播放器和多媒体格式,比如:Flash, Quicktime, Windows Media Player, Real Player, MP3, Silverlight, PDF等等. 播放器 文件格式 Quicktime aif,aiff,aac,au,bmp,gsm,mov,mid,midi,mpg,mpeg,mp4,m4a,psd,qt,qtif,qif,qti,snd,t

jQuery BlockUI 实现锁屏

当我们在前端通过ajax调用后台的时候,由于数据量各有不同,可能会造成长时间的等待,但此时等待的用户仍然可以操作界面上的其他元素,例如重新点击一个按钮,这种情况是不被允许的.或者有时候需要执行某些操作后,对用户界面进行锁屏,经过一段时间后重新恢复,此时当然会想到在页面上增加一层div来进行遮挡,但jQuery的BlockUI已经帮你完成了这样的工作,我们可以通过简单的js代码来达到各种各样的效果.jQuery BlockUI使用: 通过以下地址可以访问BlockUI的官网,上面有众多的Demo可

表单验证的validate.js插件---jQuery Validation Plugin

早上在公交车上看了一个关于慕课网的教程<表单验证的validate.js插件---jQuery Validation Plugin>,正好可以用到自己近期开发简易微博的注册页面和登录页面,插件全名叫jquery.validate.js,在引入jquery.validate.js之前要先将jquery.js引入.这个插件主要用于表单的验证,用户在注册和登录时体验十分不错!由于自己只了解关于validate的皮毛,只会简单的应用rule规则和message自定义提示,事实上,validate还有其

jQuery DataTables Plugin Meets C#

Over the weekend, I was doing some work on the internal CMS we use over at eagleenvision.net and I wanted to scrap my custom table implementation for a table system that would use JSON to return data rather than have the data be statically allocated

代码:jquery自定义插件 demo

jquery自定义插件 demo 2016-1-13 只是一个简易的示例 <script type="text/javascript" src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script> <script type="text/javascript"> $(function(){ $.fn.portamento = function