mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 19:45:04 -05:00
Completes #11799: Maybe .progress() was cooler than I thought.
Generate a .progress() for each step of an animation, once all properties are changed. Closes gh-835.
This commit is contained in:
committed by
Dave Methvin
parent
a2758377df
commit
c436ae04de
5
src/effects.js
vendored
5
src/effects.js
vendored
@@ -91,6 +91,8 @@ function Animation( elem, properties, options ) {
|
||||
animation.tweens[ index ].run( percent );
|
||||
}
|
||||
|
||||
deferred.notifyWith( elem, [ animation, percent, remaining ]);
|
||||
|
||||
if ( percent < 1 && length ) {
|
||||
return remaining;
|
||||
} else {
|
||||
@@ -159,7 +161,8 @@ function Animation( elem, properties, options ) {
|
||||
);
|
||||
|
||||
// attach callbacks from options
|
||||
return animation.done( animation.opts.done, animation.opts.complete )
|
||||
return animation.progress( animation.opts.progress )
|
||||
.done( animation.opts.done, animation.opts.complete )
|
||||
.fail( animation.opts.fail )
|
||||
.always( animation.opts.always );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user