Skip to content

Instantly share code, notes, and snippets.

@dpw1
Created March 14, 2021 14:05
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 dpw1/f853cfa40b6be224b240a0be7a2c5f59 to your computer and use it in GitHub Desktop.
Save dpw1/f853cfa40b6be224b240a0be7a2c5f59 to your computer and use it in GitHub Desktop.
Add thumbnails to the Impulse theme on mobile
this.destroyImageCarousels();
if (!theme.config.bpSmall) {
this.$mainSlider.slick(args.main);
this.$thumbSlider.slick(args.thumbs);
} else if (theme.config.bpSmall){
var thumbArrows = this.settings.thumbArrows = this.$thumbSlider.data('arrows');
const asNavFor = this.selectors.mainSlider;
this.$mainSlider.slick({
asNavFor: this.selectors.thumbSlider,
adaptiveHeight: true,
dots: false,
infinite: false,
fade: true
});
this.$thumbSlider.slick({
asNavFor: this.selectors.mainSlider,
slidesToShow: 3,
slidesToScroll: 1,
arrows: true,
dots: false,
focusOnSelect: true,
infinite: false,
customSlideAdvancement: true
})
}
this.settings.slickMainInitialized = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment