[jQuery] Block UI doesn't show at the second click

[jQuery] Block UI doesn't show at the second click


I really don't understand why the following code doesn't work . I used
BlockUI plugin in another page without t any problem but in this page
event he simple case does not work the second click. The html code is:
<input ID="btn" type="button" value="Button" class="button2"
name="div" />
<div id="div" style="display: none; cursor: default; background-
color: #ffffdd;
border-style: solid; z-index: 300;">


Bla bla bla:


<br />
<p style="text-align: center;">
<input class="cancel" id="Button21" type="button"
value="Cancel" />

</div>
$(
function()
{
$('.button2').click(
function()
{
$.blockUI($('#div'));
}
);// button2 click
$(".cancel").click(
function()
{
$.unblockUI($('#div'));
}
);// Cancel Click
}),
When the button is clicked the div is shown and after cancel is
clicked the div is unblocked, but if I click again the page is blocked
but the div is not shown. Any help would be greatly appleciated.