Search code examples
jqueryjquery-pluginsblockui

jQuery and BlockUI Object doesn't support this property or method



I am using jQuery 1.5.1 and BlockUI 2.38 in an ASP.NET page. I try to block the UI on a button click event using the code below:

$(document).ready(function () {
  $("#Button3").click(function () {
    $.blockUI({ message: 'Test' });
      setTimeout($.unblockUI, 2000);
    });
});

...

<div id="globalDiv">
  <form id="form1" runat="server">
    <asp:Button ID="Button3" runat="server" Width="80px" Text="Button3" />
  </form>
</div>

The click event is called upon clicking the button and on calling the $.blockUI I get back

Object doesn't support this property or method

Is there any known bug on the two versions, or are there any other reasons why this doesn't work...

Thanks, Tobias


Solution

  • Are you sure that the blockUI plugin script is actually being loaded?