
Untitled
By: a guest on
Jul 17th, 2012 | syntax:
None | size: 1.05 KB | hits: 15 | expires: Never
Get the source of the event from delegate when it's on document
$(document).ready(function() {
$(document).delegate("", "ajaxStart", function(event) {
console.log(event);
$.blockUI({
message: "<h1 style='color: #000'>Loading ...</h1>",
overlayCSS: {
backgroundColor: '#000',
opacity: .1
},
css: {
border: '2px solid #000',
padding: '15px',
backgroundColor: '#fff',
'-webkit-border-radius': '10px',
'-moz-border-radius': '10px',
color: '#000'
}
});
});
$(document).delegate("", "ajaxStop", function(event) {
$.unblockUI();
});
});