blockUI1.33参数

简介: The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser[1].
The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without 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.

    这个插件可以让你锁定浏览器从而组织用户的操作直到解锁。    使用非常简单。

    锁定:

$.blockUI();
   
    解锁锁定:

$
.unblockUI();


   在Ajax中使用。当触发Ajax是进行锁定,结束时解锁

$
().ajaxStart($.blockUI).ajaxStop($.unblockUI);

   以下是BlockUI默认参数配置:

$.blockUI.defaults = { 
    // message displayed when blocking (use null for no message)
     message:  '<h1>Please wait...</h1>',

    // styles for the message when blocking; if you wish to disable
    // these and use an external stylesheet then do this in your code:
    // $.blockUI.defaults.css = {};
     css: {
         padding:        0,
         margin:         0,
         width:          '30%',
         top:            '40%',
         left:           '35%',
         textAlign:      'center',
         color:          '#000',
         border:         '3px solid #aaa',
         backgroundColor:'#fff',
         cursor:         'wait'
     },

    // styles for the overlay
     overlayCSS:   {
         backgroundColor:'#000',
         opacity:        '0.6'
     },

    // styles applied when using $.growlUI
     growlCSS: {
         width:    '350px',
         top:      '10px',
         left:     '',
         right:    '10px',
         border:   'none',
         padding:  '5px',
         opacity:  '0.6',
         color:    '#fff',
         backgroundColor: '#000',
        '-webkit-border-radius': '10px',
        '-moz-border-radius':    '10px'
     },

    // z-index for the blocking overlay
     baseZ: 1000,

    // set these to true to have the message automatically centered
     centerX: true, // <-- only effects element blocking (page block controlled via css above)
     centerY: true,

    // allow body element to be stetched in ie6; this makes blocking look better
    // on "short" pages.   disable if you wish to prevent changes to the body height
     allowBodyStretch: true,

    // be default blockUI will supress tab navigation from leaving blocking content;
     constrainTabKey: true,

    // fadeIn time in millis; set to 0 to disable fadeIn on block
     fadeIn:  200,

    // fadeOut time in millis; set to 0 to disable fadeOut on unblock
     fadeOut:  400,

    // time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
     timeout: 0,

    // disable if you don't want to show the overlay
     showOverlay: true,

    // if true, focus will be placed in the first available input field when
    // page blocking
     focusInput: true,

    // suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
     applyPlatformOpacityRules: true,

    // callback method invoked when unblocking has completed; the callback is
    // passed the element that has been unblocked (which is the window object for page
    // blocks) and the options that were passed to the unblock call:
    //      onUnblock(element, options)
     onUnblock: null,

    // don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
     quirksmodeOffsetHack: 4
};

博客园大道至简

http://www.cnblogs.com/jams742003/

转载请注明:博客园

目录
相关文章
|
Linux
linux系统中串口驱动的基本实现原理
linux系统中串口驱动的基本实现原理
293 1
GEE中如何制作多线段图表?以气象数据中气温、风速和气压制作时序图表为例
GEE中如何制作多线段图表?以气象数据中气温、风速和气压制作时序图表为例
196 0
|
11月前
|
缓存 监控 网络协议
微服务系列:服务注册与发现原理详解
本文详细解析了微服务架构中的服务注册与发现原理,大厂面试高频,建议收藏。关注【mikechen的互联网架构】,10年+BAT架构经验倾囊相授。
微服务系列:服务注册与发现原理详解
|
8月前
|
算法 安全 Java
探讨组合加密算法在IM中的应用
本文深入分析了即时通信(IM)系统中所面临的各种安全问题,综合利用对称加密算法(DES算法)、公开密钥算法(RSA算法)和Hash算法(MD5)的优点,探讨组合加密算法在即时通信中的应用。
93 0
|
存储 API 开发工具
开通oss服务
开通oss服务
1386 1
|
存储 网络协议 安全
思科学院cisco独家整理题库(2022.11.7更新)(中)
思科学院cisco独家整理题库(2022.11.7更新)
3383 1
|
存储 SQL Java
Mysql数据库表字段设计优化(状态列)
初始状态码(java int 32 long 64),int 可以表示31种(除去0000),long可以表示63种(除去0000),当然不可能将0000赋值给初始状态,一般来讲,选择int还是long是根据具体业务需求来决定的。
981 0
Mysql数据库表字段设计优化(状态列)
|
算法 搜索推荐 Go
Go 实现插入排序算法及优化
本文首先对插入排序进行简单地介绍,通过图片来演示插入排序的过程,然后使用 Go 语言实现插入排序的算法。为减少算法中交换次数的逻辑,对算法进行优化,将交换的逻辑变成把前面的数往后移,最后将待排序的数插入到合适的位置即可。 除了这种优化方式,还有一种改造方式:普通的算法往左查找的方式是线性查找,由于元素是有序的,因此线性查找可以换成二分查找,但是经过二分找到待插入的位置之后,也得移动前面的元素,相比上面的优化方法,还多了 O(logn) 的查找时间复杂度,因此我认为没有必要改造成二分查找。
297 1
Go 实现插入排序算法及优化
|
资源调度 JavaScript 前端开发
VUE开发环境搭建
本文旨在为VUE前端入门人员提供环境搭建参考
7929 1
|
Linux C语言 C++
增设章节---VScode 的详细安装方式(已亲测)
针对网上根据很多安装vscode的文章,大多数都有一些问题,例如打不开launch.h等等。同时,应部分读者的建议和需求,特此,增设本安装vscode方法的章节
400 0
增设章节---VScode 的详细安装方式(已亲测)