Forums › Forums › Search & Filter Pro › Filtering with radio not working when using slick JS library on ul element
Tagged: V3
- This topic has 9 replies, 3 voices, and was last updated 5 years, 3 months ago by Ross.
Viewing 10 posts - 1 through 10 (of 10 total)
-
Anonymous(Private) September 7, 2019 at 11:32 am #220464
Hi,
I am using Ajax filtering with taxonomy as radio buttons and Slick slider (https://kenwheeler.github.io/slick/) to support better horizontal scrolling on mobile devices.
The problem is that when selecting item, right group of items is not shown. i think slick and ajax request go into conflict.
Also when item is selected, slick stops working and reinitiating it after ajax event is completed does not work.I found a similar problem here: https://support.searchandfilter.com/forums/topic/ajax-messing-up-slick-js-script/page/2/
Unfortunately solution there does not work for us.JS:
$.fn.slicknav = function() { $('.product-categories form > ul > li > ul').slick({ slidesToShow: 5, centerMode: false, arrows: false, dots: false, infinite: false, variableWidth: true, initialSlide: 1, responsive: [ { breakpoint: 1025, settings: { dots: false, arrows: false, slidesToShow: 3, centerMode: false, centerPadding: '0', } }, { breakpoint: 640, settings: { dots: false, arrows: false, slidesToShow: 1, centerMode: true, centerPadding: '0', } } ] }); }; $(document).ready(function($){ $('.product-categories form > ul > li > ul').slicknav(); }); $(document).on('sf:init, sf:ajaxfinish', '.searchandfilter', function(){ $('.product-categories form > ul > li > ul').slicknav(); });
Ross Moderator(Private) September 10, 2019 at 12:04 pm #220601This reply has been marked as private.Ross Moderator(Private) September 13, 2019 at 10:46 am #220925This reply has been marked as private.Ross Moderator(Private) September 16, 2019 at 1:17 pm #221074This reply has been marked as private. -
AuthorPosts
Viewing 10 posts - 1 through 10 (of 10 total)