首页 > 代码库 > jQuery BlockUI Plugin Demo 2
jQuery BlockUI Plugin Demo 2
Overview
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.
//Usage is very simple; to block user activity for the page:$.blockUI();//Blocking with a custom message:$.blockUI({ message: ‘<h1><img src="http://www.mamicode.com/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
jQuery BlockUI Plugin Demo 2
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。