]> source.dussan.org Git - jquery.git/commitdiff
Fixed a bug that was occurring in the packed version of jQuery.
authorJohn Resig <jeresig@gmail.com>
Mon, 10 Sep 2007 19:43:58 +0000 (19:43 +0000)
committerJohn Resig <jeresig@gmail.com>
Mon, 10 Sep 2007 19:43:58 +0000 (19:43 +0000)
src/fx.js

index c45edc1ece3ff5c7df04ac75b795edd7cc16d6e4..1028610e28494aa2ed8c077e6416ced78220dc12 100644 (file)
--- a/src/fx.js
+++ b/src/fx.js
@@ -146,19 +146,6 @@ jQuery.fn.extend({
                });
        },
 
-       dequeue: function(type){
-               type = type || "fx";
-
-               return this.each(function(){
-                       var q = queue(this, type);
-
-                       q.shift();
-
-                       if ( q.length )
-                               q[0].apply( this );
-               });
-       },
-
        stop: function(){
                var timers = jQuery.timers;
 
@@ -171,18 +158,31 @@ jQuery.fn.extend({
 
 });
 
-function queue( elem, type, array ) {
+var queue = function( elem, type, array ) {
        if ( !elem )
                return;
 
-       var queue = jQuery.data( elem, type + "queue" );
+       var q = jQuery.data( elem, type + "queue" );
 
-       if ( !queue || array )
-               queue = jQuery.data( elem, type + "queue", 
+       if ( !q || array )
+               q = jQuery.data( elem, type + "queue", 
                        array ? jQuery.makeArray(array) : [] );
 
-       return queue;
-}
+       return q;
+};
+
+jQuery.fn.dequeue = function(type){
+       type = type || "fx";
+
+       return this.each(function(){
+               var q = queue(this, type);
+
+               q.shift();
+
+               if ( q.length )
+                       q[0].apply( this );
+       });
+};
 
 jQuery.extend({