Skip to content

Instantly share code, notes, and snippets.

@tommylinks
Created January 3, 2020 09:32
Show Gist options
  • Select an option

  • Save tommylinks/98e0705f192b94ac0314fa91c5ffb8d5 to your computer and use it in GitHub Desktop.

Select an option

Save tommylinks/98e0705f192b94ac0314fa91c5ffb8d5 to your computer and use it in GitHub Desktop.
updateCounter (slick) {
currentSlide = slick.currentSlide + 1
slideCount = slick.slideCount
$('.slider-counter').text(this.currentSlide + '/' + this.slideCount)
}
$('.info-slider').on('init', (e, slick) => {
updateCounter(slick)
})
$('.info-slider').on('afterChange', (e, slick) => {
updateCounter(slick)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment