- This topic has 1 reply, 2 voices, and was last updated 6 years, 3 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 › How to use JQuery UI accordion on Ajax ?
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
});
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>