How to use JQuery UI accordion on Ajax ?

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)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.