I am using block ui for blocking the div on button click. But after blocking i want the div should be unblocked after some delay. But in my case the div is blocking permanently. Here is my code:
<script src="jQuery 1.10.1.min.js" type="text/javascript"></script>
<script src="blockui.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#Button1').click(function () {
$('div#blockit').block({
message: '<h6>Processing</h6>',
css: { border: '3px solid #a00' }
});
setTimeout($.unblockUI, 2000);
});
});
</script>
<div>
<input id="Button1" type="button" value="button" />
</div>
<div id="blockit" style="width: 200px; height=200px;">
</div>
I am unable to figure out why that settimeout is not working. Please give me the solution. Thanx in advance.