diff options
Diffstat (limited to 'src/effects.js')
-rw-r--r-- | src/effects.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/effects.js b/src/effects.js index 6a1fb3a28..cc21cfcfa 100644 --- a/src/effects.js +++ b/src/effects.js @@ -51,7 +51,7 @@ function genFx( type, includeWidth ) { // If we include width, step value is 1 to do all cssExpand values, // otherwise step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; - for ( ; i < 4 ; i += 2 - includeWidth ) { + for ( ; i < 4; i += 2 - includeWidth ) { which = cssExpand[ i ]; attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; } @@ -78,7 +78,6 @@ function createTween( value, prop, animation ) { } function defaultPrefilter( elem, props, opts ) { - /* jshint validthis: true */ var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, @@ -220,9 +219,12 @@ function defaultPrefilter( elem, props, opts ) { showHide( [ elem ], true ); } - /* jshint -W083 */ + /* eslint-disable no-loop-func */ + anim.done( function() { + /* eslint-enable no-loop-func */ + // The final step of a "hide" animation is actually hiding the element if ( !hidden ) { showHide( [ elem ] ); @@ -307,7 +309,7 @@ function Animation( elem, properties, options ) { index = 0, length = animation.tweens.length; - for ( ; index < length ; index++ ) { + for ( ; index < length; index++ ) { animation.tweens[ index ].run( percent ); } @@ -348,7 +350,7 @@ function Animation( elem, properties, options ) { return this; } stopped = true; - for ( ; index < length ; index++ ) { + for ( ; index < length; index++ ) { animation.tweens[ index ].run( 1 ); } @@ -366,7 +368,7 @@ function Animation( elem, properties, options ) { propFilter( props, animation.opts.specialEasing ); - for ( ; index < length ; index++ ) { + for ( ; index < length; index++ ) { result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); if ( result ) { if ( jQuery.isFunction( result.stop ) ) { @@ -420,7 +422,7 @@ jQuery.Animation = jQuery.extend( Animation, { index = 0, length = props.length; - for ( ; index < length ; index++ ) { + for ( ; index < length; index++ ) { prop = props[ index ]; Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; Animation.tweeners[ prop ].unshift( callback ); |