Skip to content

Instantly share code, notes, and snippets.

View jackymanovian's full-sized avatar

jackymanovian

View GitHub Profile
@alokstha1
alokstha1 / Script.js
Created May 25, 2021 08:59
Get ajax action after ajaxComplete on WordPress
jQuery(function($) {
/**
* catch AJAX complete events, to catch wordpress actions
* @param {jQuery.Event} event
* @param {jqXHR} xhr XmlHttpRequest object
* @param {Object} settings options for the AJAX request
*/
$(document).ajaxComplete(function(event, xhr, settings) {
// Specify the AJAX action after which you want to execute your JS
if ("data" in settings && settings.data.indexOf("action=your_ajax_action") != -1) {