Forums › Forums › Search & Filter Pro › Ajax loading pages breaks filter
- This topic has 13 replies, 3 voices, and was last updated 7 years, 6 months ago by Anonymous.
-
Trevor(Private) May 8, 2017 at 9:29 pm #107482
If you are talking about when using Ajax, this js code is what you need (but need to know what the code is to call that smoothstate.js):
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("ajax complete"); // load or trigegr your smoothstate js code here }); }(jQuery));</script>
Anonymous(Private) May 9, 2017 at 9:45 am #107565Thanks Trevor – I was looking at those functions sf:ajaxstart and sf:ajaxfinish but I don’t think they’re what I need.
Smoothstate is to give a developer control over page transitions so it fetches all content on the site from ajax and injects it in a container. So Smoothstate runs first then I need to load in the SF filter. Here’s an example of Smoothstate working: http://aaronporter.co
Trevor(Private) May 9, 2017 at 6:57 pm #107778Looking more closely at the page HTML, there appears to be some custom CSS hiding the real option boxes. Do you have any idea where that is coming from? It looks like it may be a file called
plugin.min.js
Even when I manually reveal the select box by making the opacity 1 it still does not trigger the javascript to reload the results. If your smoothstate code is disabled, then all works OK?
-
AuthorPosts