Changes to the scheduleUpdateInterval
scheduleUpdateInterval: function() {
var self = this;
self.updateDom(self.config.animationSpeed);
// setInterval placed within a variable so you can clear it
this.interval = setInterval(function() {
self.activeItem++;
self.updateDom(self.config.animationSpeed);
}, this.config.updateInterval);
},
And some functions to start and stop the interval
intpause: function(){
clearInterval(this.interval);
},
intresume: function(){
this.scheduleUpdateInterval();
},