]> source.dussan.org Git - jquery.git/commitdiff
Squashed commit of the following:
authorCorey Frang <gnarf@gnarf.net>
Wed, 12 Oct 2011 01:21:59 +0000 (21:21 -0400)
committerDave Methvin <dave.methvin@gmail.com>
Wed, 12 Oct 2011 01:21:59 +0000 (21:21 -0400)
commit af3fd32f207ed080084f10d76f89c07c414baa05
Merge: 83c08ff fdd60f8
Author: Dave Methvin <dave.methvin@gmail.com>
Date:   Tue Oct 11 21:17:56 2011 -0400

    Merge branch 'stop' of https://github.com/gnarf37/jquery into pull-541-stop

commit fdd60f8705e98430df62196f505cb929b2d7f6bc
Author: Corey Frang <gnarf@gnarf.net>
Date:   Mon Oct 10 13:51:59 2011 -0500

    .stop( [queue,] clearQueue, gotoEnd )

src/effects.js
test/unit/effects.js

index 147763d635e2814ffc15560d6b0ad175c09689f6..9be9293e58211f74f0b8fcdc80a6adcf3180a4cd 100644 (file)
@@ -248,7 +248,12 @@ jQuery.fn.extend({
                        this.queue( optall.queue, doAnimation );
        },
 
-       stop: function( clearQueue, gotoEnd, type ) {
+       stop: function( type, clearQueue, gotoEnd ) {
+               if ( typeof type !== "string" ) {
+                       gotoEnd = clearQueue;
+                       clearQueue = type;
+                       type = undefined;
+               }
                if ( clearQueue && type !== false ) {
                        this.queue( type || "fx", [] );
                }
index 4b565a2d1716c67952bf6599593e454bd8a46e54..b52e2414ff600ba981f2fa0fc8025b95137a8dd2 100644 (file)
@@ -659,7 +659,7 @@ test("stop(clearQueue, gotoEnd)", function() {
        }, 100);
 });
 
-asyncTest( "stop( ..., ..., queue ) - Stop single queues", function() {
+asyncTest( "stop( queue, ..., ... ) - Stop single queues", function() {
        expect( 3 );
        var foo = jQuery( "#foo" ),
                saved;
@@ -681,7 +681,7 @@ asyncTest( "stop( ..., ..., queue ) - Stop single queues", function() {
        },{
                duration: 1000,
                queue: "height"
-       }).dequeue( "height" ).stop( false, true, "height" );
+       }).dequeue( "height" ).stop( "height", false, true );
 
        equals( foo.height(), 400, "Height was stopped with gotoEnd" );
 
@@ -690,7 +690,7 @@ asyncTest( "stop( ..., ..., queue ) - Stop single queues", function() {
        },{
                duration: 1000,
                queue: "height"
-       }).dequeue( "height" ).stop( false, false, "height" );
+       }).dequeue( "height" ).stop( "height", false, false );
        saved = foo.height();
 });