Skip to content

Instantly share code, notes, and snippets.

@rainjeck
Last active July 29, 2021 14:41
Show Gist options
  • Save rainjeck/a21b56339895b441cfd609f121014cd1 to your computer and use it in GitHub Desktop.
Save rainjeck/a21b56339895b441cfd609f121014cd1 to your computer and use it in GitHub Desktop.
Swiper Slider - same height for slides
const slider = this;
const wrapper = this.wrapperEl;
[].forEach.call(slider.slides, function(slide) {
slide.style.height = "";
});
setTimeout(() => {
[].forEach.call(slider.slides, function(slide) {
slide.style.height = wrapper.clientHeight + "px";
});
}, 300);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment