Forums Forums Search & Filter Pro Show/Hide of Search fields with AJAX running

Viewing 2 posts - 1 through 2 (of 2 total)
  • Anonymous
    #213847

    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?

    Trevor
    #213884

    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

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