I’m testing out http://code.google.com/p/jquery-loadmask/ where it unmasks after an ajax call:
$("#content-container").mask("Waiting...");
$.ajax({
url: "test.htm",
dataType: "html",
success: function(data){
$("#content").html( data );
$("#content-container").unmask();
}
});
the mask call fires but the unmask fails. Newer calls fail for mask. It seems that somehow the mask function is getting unbound but no errors are getting reported to the console. I tried to create a smaller sample to illustrate the issue but it only happens in our larger code base so something may be tripping it up.
Any thoughts on the best way to debug the issue?
You could try adding
error: function(XMLHttpRequest, textStatus, errorThrown) {}andcomplete: function(jqXHR, textStatus) {}to the ajax call and see if your call ends up there.Possibly better to keep the
unmaskwithincomplete() {}as it would work on success as well as on error.