- This topic has 2 replies, 2 voices, and was last updated 7 years, 4 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › jQuery not working after AJAX refresh
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!
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>