Spinner: Replace var that with this and _delay

This commit is contained in:
Jörn Zaefferer 2011-09-13 00:28:29 +02:00
parent 45ed8d8447
commit 61290de86d

View File

@ -202,12 +202,11 @@ $.widget( "ui.spinner", {
},
_repeat: function( i, steps, event ) {
var that = this;
i = i || 500;
clearTimeout( this.timer );
this.timer = setTimeout(function() {
that._repeat( 40, steps, event );
this.timer = this._delay(function() {
this._repeat( 40, steps, event );
}, i );
this._spin( steps * this.options.step, event );