aboutsummaryrefslogtreecommitdiffstats
path: root/src/effects.js
diff options
context:
space:
mode:
authorlouisremi <louisremi@louisremi-laptop.(none)>2011-04-14 11:46:29 +0200
committerlouisremi <louisremi@louisremi-laptop.(none)>2011-04-14 11:46:29 +0200
commit8806435a77886dad8970e8f9ddba1ef728d779f8 (patch)
treeb79019466022ad26e53abde5937f5cf0fa4b53fd /src/effects.js
parent780b7983d0a2fbde5cedcdb431a1f2436b256d40 (diff)
parent38d6d9f6e03e544c3ea7a9f226c3f93d1d97c232 (diff)
downloadjquery-8806435a77886dad8970e8f9ddba1ef728d779f8.tar.gz
jquery-8806435a77886dad8970e8f9ddba1ef728d779f8.zip
Merge branch 'master' of http://github.com/jquery/jquery into effectsCleanup
Diffstat (limited to 'src/effects.js')
-rw-r--r--src/effects.js17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/effects.js b/src/effects.js
index 80c033abc..e4f37e0c9 100644
--- a/src/effects.js
+++ b/src/effects.js
@@ -152,13 +152,17 @@ jQuery.fn.extend({
var optall = jQuery.speed(speed, easing, callback);
if ( jQuery.isEmptyObject( prop ) ) {
- return this.each( optall.complete );
+ return this.each( optall.complete, [ false ] );
}
return this[ optall.queue === false ? "each" : "queue" ](function() {
// XXX 'this' does not always have a nodeName when running the
// test suite
+ if ( optall.queue === false ) {
+ jQuery._mark( this );
+ }
+
var opt = jQuery.extend({}, optall), p,
isElement = this.nodeType === 1,
hidden = isElement && jQuery(this).is(":hidden"),
@@ -268,6 +272,10 @@ jQuery.fn.extend({
}
this.each(function() {
+ // clear marker counters if we know they won't be
+ if ( !gotoEnd ) {
+ jQuery._unmark( true, this );
+ }
// go in reverse order so anything added to the queue during the loop is ignored
for ( var i = timers.length - 1; i >= 0; i-- ) {
if ( timers[i].elem === this ) {
@@ -319,10 +327,13 @@ jQuery.extend({
// Queueing
opt.old = opt.complete;
- opt.complete = function() {
+ opt.complete = function( noUnmark ) {
if ( opt.queue !== false ) {
- jQuery(this).dequeue();
+ jQuery.dequeue( this );
+ } else if ( noUnmark !== false ) {
+ jQuery._unmark( this );
}
+
if ( jQuery.isFunction( opt.old ) ) {
opt.old.call( this );
}