一款小巧的jquery.blockUI.js

今天发现一款老外的小巧的jquery.blockUI.js ,比如能做弹出窗口,效果不错,
代码为:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>

   <script type="text/javascript" src="jquery.blockUI.js">

<input type="button" value="press" id="press" />
<script type="text/javascript">
                $(document).ready(function() {
                    $('#press').click(function() {
                        $.growlUI(null, 'Sample message');
                    });
                });
</script>



</script>



主要这个插件是用来在ajax请求的时候block ui的,给用户提示,等待等,参考介绍:
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:

更多的请参考http://jquery.malsup.com/block/

你可能感兴趣的:(jquery)