]> source.dussan.org Git - jquery.git/commitdiff
Added a step callback to be executed on every step of an fx animation.
authorJohn Resig <jeresig@gmail.com>
Tue, 22 Aug 2006 05:35:48 +0000 (05:35 +0000)
committerJohn Resig <jeresig@gmail.com>
Tue, 22 Aug 2006 05:35:48 +0000 (05:35 +0000)
src/fx/fx.js

index de65cfa29b1c8b0b0fa3f4469efe04d2ad3b8230..eb27c3a4b5842722e42a346a344e9d49b762ae3e 100644 (file)
@@ -373,7 +373,8 @@ jQuery.extend({
                // The users options
                z.o = {
                        duration: options.duration || 400,
-                       complete: options.complete
+                       complete: options.complete,
+                       step: options.step
                };
        
                // The element
@@ -384,6 +385,9 @@ jQuery.extend({
        
                // Simple function for setting a style value
                z.a = function(){
+                       if ( options.step )
+                               options.step.apply( elem, [ z.now ] );
+
                        if ( prop == "opacity" ) {
                                if (z.now == 1) z.now = 0.9999;
                                if (window.ActiveXObject)