Skip to content

Instantly share code, notes, and snippets.

@Sharifur
Created April 4, 2018 11:03
Show Gist options
  • Save Sharifur/0e2ffa1dbfff775c05e0b420c52a4d70 to your computer and use it in GitHub Desktop.
Save Sharifur/0e2ffa1dbfff775c05e0b420c52a4d70 to your computer and use it in GitHub Desktop.
slick slider activation with reponsive
//testimonial carousel
var $testimonial = $('#testimonial-carousel');
var $testimonialNav = $('#testimonial-thumbnail');
$testimonial.slick({
slidersToShow:1,
slidersToScroll:1,
arrows:false,
autoplay:true,
fade:true,
asNavFor: $testimonialNav,
responsive: [{
breakpoint: 1024,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
// centerMode: true,
}
}, {
breakpoint: 800,
settings: {
slidesToShow: 1,
slidesToScroll: 2,
dots: true,
infinite: true,
}
}, {
breakpoint: 600,
settings: {
slidesToShow: 1,
slidesToScroll: 2,
dots: true,
infinite: true,
}
}, {
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
dots: true,
infinite: true,
autoplay: true,
autoplaySpeed: 2000,
}
}]
});
$testimonialNav.slick({
slidersToShow: 5,
slidersToScroll:1,
asNavFor: $testimonial,
dots:false,
focusOnSelect:true,
fade: true,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment