Forums › Forums › Search & Filter Pro › Ajax and Slick JS
Tagged: Slick js
- This topic has 1 reply, 2 voices, and was last updated 5 years, 3 months ago by
Trevor.
-
Anonymous(Private) December 8, 2020 at 12:30 am #269049
Hi,
I have problem to use Search and Filter with Ajax and the plugin “Slick JS”.
The problem is similare to this post and i don’t see the solution :
https://support.searchandfilter.com/forums/topic/ajax-loading-killing-slick-js-slider/The code below works, window alert and “ajax complete” appears in console :
(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("ajax complete"); window.alert("sometext"); }); }(jQuery));So i wrote this code instead :
(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("ajax complete"); $('.references-client .search-filter-results-list').slick({ infinite: true, slidesToShow: 3, slidesToScroll: 1, waitForAnimate: true, autoplay: false, autoplaySpeed: 4500, useCSS: true, useTransform: true, arrows: true, dots: false, touchMove: true, centerPadding: '50px' }); }); }(jQuery));But in console “$(…).slick is not a function”.
If i only wrote :
$(document).on('ready', function() { $('.references-client .search-filter-results-list').slick({ infinite: true, slidesToShow: 3, slidesToScroll: 1, waitForAnimate: true, autoplay: false, autoplaySpeed: 4500, useCSS: true, useTransform: true, arrows: true, dots: false, touchMove: true, centerPadding: '50px' }); });The slide works but no works if i change the select of “Search and filter”.
I’m new on jquery, do you see the solution?
NB: my website project is private and can’t share in public. And i know Slick JS is not you plugin but i really need to understand why it’s not work
Trevor(Private) December 8, 2020 at 1:17 pm #269081slickmust be a function being defined elsewhere, as it is not a standard jQuery function. I am sorry, but help with this would be outside the scope of our support. This Google search might help:https://www.google.com/search?q=reapply+slick+after+ajax+refresh+site:stackoverflow.com
But you may need to seek the help of a third party coder.
-
AuthorPosts