This file contains 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
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) { |