> I found some problems in jquery blockui plugin, I don't know whether
> it is my fault or the plugin's.
>
> You see the code below:
>
> <html>
> <script type="text/javascript" src="js/jquery-nightly.js"></script>
> <script type="text/javascript" src="js/jquery.blockUI.js"></script>
>
> <script type="text/javascript">
>     function block()
>     {
>         $('#waitting').show();
>         $.blockUI({
>             message:$('#waitting'),
>            css: {
>                 cursor: 'auto'
>             }
>         })
>     }
>     function unblock()
>     {
>         $.unblockUI();
>         $('#waitting').hide();
>     }
> </script>
> <body>
> <button onclick="block()">&nbsp;OK&nbsp;</button>
> <div id="waitting" style="display:none">
>     <button name="Cancel" onclick="unblock()">Cancel</button>
> </div>
> </body>
> </html>
>
> What I thought is:
> after the "Ok" button is clicked, the page is blocked and the "cancel"
> button is shown,  then  clicked the "cancel" button, the page is
> unbloked and  the "cancel" button is hidden.
>
> But in fact, the demo code doesn't work as I expected: the "cancel"
> button is still there.
> Besides, I use "cursor: 'auto'", but I still got a "wait" cursor.
>
> Can anyone explain?


You need to remove this line:

$('#waitting').show();

The plugin will handle showing the message for you.

Regarding the cursor, the styles you provide are applied to the
message area, not the page.

Mike

Reply via email to