首页 > 代码库 > jQuery BlockUI Plugin Demo 3(Page Blocking Examples)
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 stops $(document).ajaxStop($.unblockUI); function test() { $.ajax({ url: ‘wait.php‘, cache: false }); } $(document).ready(function() { $(‘#pageDemo1‘).click(function() { $.blockUI(); test(); }); $(‘#pageDemo2‘).click(function() { $.blockUI({ message: ‘<h1><img src="http://www.mamicode.com/busy.gif" /> Just a moment...</h1>‘ }); test(); }); $(‘#pageDemo3‘).click(function() { $.blockUI({ css: { backgroundColor: ‘#f00‘, color: ‘#fff‘ } }); test(); }); $(‘#pageDemo4‘).click(function() { $.blockUI({ message: $(‘#domMessage‘) }); test(); }); }); </script> ... <div id="domMessage" style="display:none;"> <h1>We are processing your request. Please be patient.</h1> </div>
参考:http://malsup.com/jquery/block/#overview
jQuery BlockUI Plugin Demo 3(Page Blocking Examples)
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。