- This topic has 1 reply, 2 voices, and was last updated 6 years, 11 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 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 › Show/Hide of Search fields with AJAX running
Tagged: ajax, DOM manipulation, toogle fields
Hello,
I would like some help on how I can go about toggling the visibility of search fields with AJAX still running. The problem is that when I change a value on the form, AJAX completely rebuilds the form, removing any classes I had added to track whether form fields should be open or closed.
I am looking to achieve this: NOLS Course Filtering
Thoughts?
For our plugin, after an ajax call, you can use a script like this:
<script>(function ( $ ) {
"use strict";
$(document).on("sf:ajaxfinish", ".searchandfilter", function(){
// so load your scripts/function here again
});
}(jQuery));</script>
If you have Auto Count enabled, this might refresh the form, and so the above code would change to use sf:ajaxformfinish