I am trying to set the minimum display of BlockUI, but with a problem. No matter what value I put in setTimeout, the element is immediately unlocked.
Here I configure the jQuery ajaxForm plugin options:
var options = { type: 'POST', contentType: 'application/json; charset-utf-8', dataType: 'json', complete: function () { setTimeout($('#MyElement').unblock(), 5000); } };
And here I show the BlockUI in "MyElement" when the submit button is clicked.
$('.submit').click(function () { window.showBlockUI($('#MyElement')); });
Any ideas? Thanks.
source share