BlockUI jQuery遮罩插件

BlockUI jQuery遮罩插件 是一个可以应用到一个div的遮罩插件。

官网地址:http://jquery.malsup.com/block/(墙)

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



根据div id进行遮罩,当然也可以对整个页面遮罩。



加遮罩:

$('#divid').block({ 
		message:" 正在加载,请等待",
		css: { 
        border: 'none', 
        textAlign:'center', 
        '-webkit-border-radius': '10px', 
        '-moz-border-radius': '10px', 
        color: '#000' 
    } }); 

 


去掉遮罩:

$('#divid').unblock(); 








你可能感兴趣的:(js)