Timer not being reset in carousel
Created by: tslpublisher
When clicking next just before a the interval has finished it is like you have just skipped an item.
I have come up with a solution for you, instead of
, next: function () {
if (this.sliding) return
return this.slide('next')
}
, prev: function () {
if (this.sliding) return
return this.slide('prev')
}
in the prototype, use
, next: function () {
if (this.sliding) return
clearInterval(this.interval)
this.interval = null
this.cycle
return this.slide('next')
}
, prev: function () {
if (this.sliding) return
clearInterval(this.interval)
this.interval = null
this.cycle
return this.slide('prev')
}