Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro jQuery not working after AJAX refresh

Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • possible
    #188253

    Hi, I have a portfolio site and I use the S&F Pro to filter by a custom taxonomy, so far everything works fine. My issue is that all of the jQuery in the page stops working, the OWL carousel, simple click events to open a modal window, etc.

    What do I have to fix all of my custom scripts to continue to work after I filter my results?

    Thanks!

    Trevor Moderator
    #188254

    Hi

    They need to be run/initialised again after Ajax has refreshed the results. Adding a script like this to your site will do it:

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

    Thanks! it works perfectly.

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

The topic ‘jQuery not working after AJAX refresh’ is closed to new replies.