Forums › Forums › Search & Filter Pro › Ajax event listeners not working
- This topic has 11 replies, 2 voices, and was last updated 5 years, 9 months ago by
Trevor.
-
Anonymous(Private) July 9, 2019 at 6:56 pm #215857
Hi,
I have defined SF Ajax event listeners on the site, but none of them seem to work. I have added the following:
$(document).on(“sf:ajaxstart”, “.searchandfilter”, function(){
console.log(“ajax start”);
});
$(document).on(“sf:ajaxfinish”, “.searchandfilter”, function(){
console.log(“ajax complete”);
});
$(document).on(“sf:init”, “.searchandfilter”, function(){
console.log(“S&F JS initialised”);
});I also tried following as suggested by FAQ, but same results, nothing gets logged to the console:
(function ( $ ) {
“use strict”;
$(document).on(“sf:ajaxformstart”, “.searchandfilter”, function(){
console.log(“ajax start”);
});
$(document).on(“sf:ajaxformfinish”, “.searchandfilter”, function(){
console.log(“ajax finish”);
});
}(jQuery));The page is post type archive with AJAX enabling, displaying posts that can be filter by taxonomy.
Best regards,
Verner -
AuthorPosts