Forums › Forums › Search & Filter Pro › Filter Counter
Tagged: V3
- This topic has 12 replies, 2 voices, and was last updated 4 years, 4 months ago by Anonymous.
-
Anonymous(Private) September 8, 2020 at 2:05 pm #258794
Hi,
On my page I have a City Menu (no searchfilter) and Search&filter Plugin.If I select a city from the (CITY MENU) the plugin count (search & filter) is updated automatically
if instead I click on an element of the filter (search & filter) the count (CITY MENU) is not updated.
Is there any way any way to make my Menu count (dynamic) and make it work with search & filter?
I hope I have explained myself correctly
Thanks
Trevor(Private) September 9, 2020 at 3:50 pm #258930You could make it so using custom javascript. If, in that hidden field, you enabled the count setting, in the form ‘city’ would have the counts. Your javascript would then update the counts in the city section from there. Not something we can help you with, except for the trigger part of the code.
If you have Auto Count enabled, after the fields in the form update, your script would look like this:
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxformfinish", ".searchandfilter", function(){ // run your code here }); }(jQuery));</script>
After the results update using Ajax, your script would look like this:
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ // run your code here }); }(jQuery));</script>
In V3 (due in a few months), you would be able to place the city field from the form in that header, and so avoid all of this.
-
AuthorPosts