Created
March 14, 2021 14:05
-
-
Save dpw1/f853cfa40b6be224b240a0be7a2c5f59 to your computer and use it in GitHub Desktop.
Add thumbnails to the Impulse theme on mobile
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
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