Last active
May 25, 2022 14:35
-
-
Save gzalinski/09bb1bd9b63a7eb4e7caed44364a86d9 to your computer and use it in GitHub Desktop.
[jQuery catch ajax complete event] #js #snippet #ajax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ajaxComplete(function (event, xhr, settings) { | |
//if (!settings.url.includes('update_listing_account')) { return; } | |
if (typeof settings.data != 'object') { return } | |
if (settings.data.get('action') != 'update_listing_account') { return } | |
if (typeof xhr.responseText != 'undefined') { | |
const response = $.parseJSON(xhr.responseText) | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment