-
-
Save kythuatwebso/17aa1a65be749c94ce147ae5ecd77620 to your computer and use it in GitHub Desktop.
Slick.js slider with thumbnails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.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