JQuery blockUI doesn't work unless I show an alert first
问题 I'm having troubles getting JQuery blockUI to work. I'm using this code: $.blockUI({ message : null, overlayCSS : { backgroundColor : '#000000;', opacity : .4 } }); If I just call the above and then call the sleep function below I get the following behavior: Nothing happens for 5 seconds The block flashes var start = new Date().getTime(); for (var i = 0; i < 1e7; i++) { if ((new Date().getTime() - start) > 5000) { break; } } If I run this code: alert("foo"); $.blockUI({ message : null,