Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kythuatwebso/17aa1a65be749c94ce147ae5ecd77620 to your computer and use it in GitHub Desktop.
Save kythuatwebso/17aa1a65be749c94ce147ae5ecd77620 to your computer and use it in GitHub Desktop.
Slick.js slider with thumbnails
$('.specs__slider').slick({
dots: true,
centerMode: true,
focusOnSelect: true,
arrows: false,
customPaging: function(slider, i) {
return '<div class="thumbnails">' +$(slider.$slides[i]).find('img').prop('outerHTML')+ '</div>';
}
});
// HOAC
$('.specs__slider').slick({
dots:true,
prevArrow: '<a class="slick-prev" href="#"><i class="fal fa-arrow-circle-left"></i></a>',
nextArrow: '<a class="slick-next" href="#"><i class="fal fa-arrow-circle-right"></i></a>',
customPaging: function(slick,index) {
var targetImage = slick.$slides.eq(index).find('img').attr('src');
return '<img src=" ' + targetImage + ' " class="img-thumbnail" />';
}
});
// HOAC
https://stackoverflow.com/a/39567512/15884373
//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment