Skip to content

Commit 6c4ca13

Browse files
gnarfdmethvin
authored andcommitted
Squashed commit of the following:
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 fdd60f8 Author: Corey Frang <gnarf@gnarf.net> Date: Mon Oct 10 13:51:59 2011 -0500 .stop( [queue,] clearQueue, gotoEnd )
1 parent 83c08ff commit 6c4ca13

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

‎src/effects.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,12 @@ jQuery.fn.extend({
248248
this.queue( optall.queue, doAnimation );
249249
},
250250

251-
stop: function( clearQueue, gotoEnd, type ) {
251+
stop: function( type, clearQueue, gotoEnd ) {
252+
if ( typeof type !== "string" ) {
253+
gotoEnd = clearQueue;
254+
clearQueue = type;
255+
type = undefined;
256+
}
252257
if ( clearQueue && type !== false ) {
253258
this.queue( type || "fx", [] );
254259
}

‎test/unit/effects.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ test("stop(clearQueue, gotoEnd)", function() {
659659
}, 100);
660660
});
661661

662-
asyncTest( "stop( ..., ..., queue ) - Stop single queues", function() {
662+
asyncTest( "stop( queue, ..., ... ) - Stop single queues", function() {
663663
expect( 3 );
664664
var foo = jQuery( "#foo" ),
665665
saved;
@@ -681,7 +681,7 @@ asyncTest( "stop( ..., ..., queue ) - Stop single queues", function() {
681681
},{
682682
duration: 1000,
683683
queue: "height"
684-
}).dequeue( "height" ).stop( false, true, "height" );
684+
}).dequeue( "height" ).stop( "height", false, true );
685685

686686
equals( foo.height(), 400, "Height was stopped with gotoEnd" );
687687

@@ -690,7 +690,7 @@ asyncTest( "stop( ..., ..., queue ) - Stop single queues", function() {
690690
},{
691691
duration: 1000,
692692
queue: "height"
693-
}).dequeue( "height" ).stop( false, false, "height" );
693+
}).dequeue( "height" ).stop( "height", false, false );
694694
saved = foo.height();
695695
});
696696

0 commit comments

Comments
 (0)