I've got this cool ajax function
function do_ajax_request(t){
var form = $('#edit_'+t);
var loadingDiv = $('#loading_'+t);
$.ajax({
url: form.attr("action"),
type: "POST",
data: form.serialize(),
cache: false,
beforeSend: function(){
form.hide();
loadingDiv.show();
},
complete: function(){
loadingDiv.hide();
form.show();
},
success: function (result) {
}
});
}
All is working well, but I'd like to enhance it by turning the entire page content into gray during before/after ajax events. Similar to a modal effect without the dialog box as shown here.
Is there a way to achieve this?
Thanks in advance,
Javier Q.