Skip to content

Instantly share code, notes, and snippets.

@nanna-dk
Created January 29, 2020 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanna-dk/c17798c265d1b1423c97201ad2aa7c6f to your computer and use it in GitHub Desktop.
Save nanna-dk/c17798c265d1b1423c97201ad2aa7c6f to your computer and use it in GitHub Desktop.
Multiple slick sliders
$(function () {
var $slideshow = $(".carousel");
$slideshow.each(function () {
if ($(this).is(".type-one-carousel")) {
$(this).slick({
dots: true,
infinite: true,
slidesToShow: 2
});
} else if ($(this).is(".type-two-carousel")) {
$(this).slick({
dots: true,
infinite: true,
slidesToShow: 6
});
} else {
$(this).slick();
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment