Forums Forums Search & Filter Pro Ajax event listeners not working

Viewing 10 posts - 1 through 10 (of 12 total)
  • Anonymous
    #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

    Trevor
    #215862

    How have you added them to the page?

    Anonymous
    #215883
    This reply has been marked as private.
    Trevor
    #215911
    This reply has been marked as private.
    Anonymous
    #216014
    This reply has been marked as private.
    Trevor
    #216093
    This reply has been marked as private.
    Anonymous
    #216095
    This reply has been marked as private.
    Trevor
    #216099
    This reply has been marked as private.
    Anonymous
    #216105
    This reply has been marked as private.
    Trevor
    #216112

    That would do it, BUT, the Post Type has to have an archives page/template. The URL will switch to having a query string for the taxonomy.

Viewing 10 posts - 1 through 10 (of 12 total)