mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-22 07:52:29 +03:00
Ensure DOM is loaded before binding the global AJAX error handler.
This commit is contained in:
parent
e7b4aeedab
commit
88028d5770
1 changed files with 4 additions and 2 deletions
|
@ -25,8 +25,10 @@ window.GeneralFunctions = window.GeneralFunctions || {};
|
|||
/**
|
||||
* Register global error handler.
|
||||
*/
|
||||
$(document).ajaxError(function (event, jqxhr, settings, thrownError) {
|
||||
GeneralFunctions.ajaxFailureHandler(jqxhr, settings, thrownError);
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
$(document).ajaxError(function (event, jqxhr, settings, thrownError) {
|
||||
GeneralFunctions.ajaxFailureHandler(jqxhr, settings, thrownError);
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue