Forums Forums Search & Filter Pro How to get SF to work when the search page is loaded with ajax?

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #224170

    Hello,

    I am unable to get SF to work when i ajax load a page. If i do a regular page load it all works, I obviously need to initialise something via js but unsure what.

    The site is https://app.topline-music.com

    If you load that page and click the magnifying glass (top left), wait for the page to load then type in something like “dark” nothing will happen and hitting search or return will do a page load. However if you load that page cold, and type “dark” into the box it will dim and load the results via the SF ajax functionality.

    Any help much appreciated!

    Matt

    Trevor
    #224187
    This reply has been marked as private.
    Anonymous
    #224197
    This reply has been marked as private.
    Trevor
    #224201

    I am not sure you can do it the way you want. We DO have a JavaScript method to allow you to reload other JavaScripts used in the results. Maybe you could use that?

    Anonymous
    #224213
    This reply has been marked as private.
    Trevor
    #224217

    You would probably need to talk with the author of the Audio player software. If it is a popular one, other users may have posted a solution on these forums already, in which case a quick search might show those posts.

    Our part of the needed code looks like this:

    <script>(function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        console.log("ajax complete");
    
    // call your function here
    
      });
    }(jQuery));</script>

    These were the threads that I could find:

    https://support.searchandfilter.com/forums/topic/display-issue-3/
    https://support.searchandfilter.com/forums/topic/problem-with-acf-meta-key-values/
    https://support.searchandfilter.com/forums/topic/dynamic-result-url/

Viewing 6 posts - 1 through 6 (of 6 total)