Skip to content

Instantly share code, notes, and snippets.

@yratof
Created May 11, 2017 11:11
Show Gist options
  • Save yratof/01d72484eeb53049c2252a7fd599fb18 to your computer and use it in GitHub Desktop.
Save yratof/01d72484eeb53049c2252a7fd599fb18 to your computer and use it in GitHub Desktop.
Slick slider for slides with titles
jQuery(document).ready(function ($) {
$('.slider-for').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
fade: true,
asNavFor: '.slider-nav',
autoplay: true
});
$('.slider-nav').slick({
slidesToShow: 3,
slidesToScroll: 1,
asNavFor: '.slider-for',
arrows: false,
dots: false,
centerMode: true,
focusOnSelect: true,
responsive: [
{
breakpoint: 1280,
settings: {
slidesToShow: 3,
slidesToScroll: 3,
infinite: true,
dots: false
}
},
{
breakpoint: 900,
settings: {
slidesToShow: 2,
slidesToScroll: 1,
centerMode: false
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
],
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment