Hi there,
Those 2 snippets are for different situation, the first one ( yith-wcan-ajax-loading ) is triggered before the filtering starts ( ajax call ). The second one ( yith-wcan-ajax-loading ) is right after the filtering has been completed.
You can use any of them to add your custom js with the following code in the functions.php of your current theme:
if( ! function_exists( 'yith_wcan_add_custom_js_code' ) ){
function yith_wcan_add_custom_js_code(){
$js ="jQuery(document).on('yith-wcan-ajax-filtered', function(){ /** or yith-wcan-ajax-loading**/
/** Your js code here **/
});";
wp_add_inline_script( 'yith-wcan-shortcodes', $js );
}
add_action( 'wp_enqueue_scripts', 'yith_wcan_add_custom_js_code', 20 );
}
Let us know if it worked for you.