Forums Forums Search & Filter Pro How to use JQuery UI accordion on Ajax ?

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

    Hello S&F, I’m trying to add accordion on the radio type and I’m using JQuery UI accordion but unfortunately the accordion doesn’t apply after I filter a products via AJAX.

    I’m using this code. but my accordion disappear after an AJAX filter.

    $(document).on(“sf:init sf:ajaxfinish”, “.searchandfilter”, function(){
    $(‘[data-sf-field-input-type=”radio”]’).accordion({ collapsible: true, active: 0 });
    //so load your lightbox or JS scripts here again
    });

    Trevor
    #228828

    Is this being loaded inside another function, or it’s own, like this:

    <script>(function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        $('[data-sf-field-input-type="radio"]').accordion({ collapsible: true, active: 0 });
      });
    }(jQuery));</script>
Viewing 2 posts - 1 through 2 (of 2 total)