Jquery BlockUI Button Click

Jquery BlockUI Button Click

Notice that starting blockui to unblockui there are lots of codes and it takes 1-5 seconds to finish it works. But  Jquery Block UI never shows up.   Any Ideas?

I add my button like this.
$button = $('<input type="button" />').appendTo($divmenu1);
 $button.attr("id", "searchbutton");

//here is the click event
$("#searchbutton").on('click', function () {
        $.blockUI({
            message: '<h4> Please Wait...</h4>',
            css: {
                border: '3px solid #a00',                
            }
        });

       //
      //   there is the business process
      //
        $.unblockUI();


    });