> $().ajaxStart($.blockUI).ajaxStop($.unblockUI); > > Now, i would like to know if it is possible to customize this call so > that the concerned element shows blockUI, instead of the whole page ?
To block only a single element you would use "block" instead of "blockUI". $('#myDiv').block(); ... $('#myDiv').unblock(); To make it generic, somewhere some code has to set the context for what needs to be blocked. You didn't show any of the other code you're using so it's hard to say. But in pseudo-code it would look like: $().ajaxStart(function() { var el = get the element that needs to be blocked $(el).block(); }).ajaxStop(function() { var el = get the element that needs to be un blocked $(el).unblock(); });