aboutsummaryrefslogtreecommitdiffstats
path: root/src/effects.js
diff options
context:
space:
mode:
authorCorey Frang <gnarf@gnarf.net>2012-06-23 16:50:57 -0500
committerDave Methvin <dave.methvin@gmail.com>2012-06-25 10:34:25 -0400
commitc436ae04de80f8d232b5456f605331ecfaba4f49 (patch)
treee96e8bbf10d4c018a5fe961a5fe1b4846efd851f /src/effects.js
parenta2758377df7eef02d155a30f869bdc3d8b7c02b9 (diff)
downloadjquery-c436ae04de80f8d232b5456f605331ecfaba4f49.tar.gz
jquery-c436ae04de80f8d232b5456f605331ecfaba4f49.zip
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.
Diffstat (limited to 'src/effects.js')
-rw-r--r--src/effects.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/effects.js b/src/effects.js
index 7c43dc178..f1bbed763 100644
--- a/src/effects.js
+++ b/src/effects.js
@@ -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 );
}