The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery plugin callback and ‘this’ Re: jQuery plugin callback and ‘this’


You can start by not adding vars to global scope:

var current_number = settings.startFrom;

This does fix the problem but the real issue is the timer that seems to ignore `clearTimeout`

console.log(timer + ‘: target = ‘ +‘id’) + ‘, number = ‘ + current_number);;

If you log that you can see the timer keeps running, or at least it seems to.