zoukankan      html  css  js  c++  java
  • 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="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

  • 相关阅读:
    281. Zigzag Iterator
    298. Binary Tree Longest Consecutive Sequence
    482. License Key Formatting
    361. Bomb Enemy
    373. Find K Pairs with Smallest Sums
    304. Range Sum Query 2D
    308. Range Sum Query 2D
    307. Range Sum Query
    303. Range Sum Query
    247. Segment Tree Query II
  • 原文地址:https://www.cnblogs.com/wolfocme110/p/4267675.html
Copyright © 2011-2022 走看看