X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Ffx%2Ffx.js;h=dd72c650534b98911c94c89cf093241eb0a5677f;hb=df91317ab43254bb0095482c49de080f5cf4f89e;hp=e6b599611b1d3a908c8c7ba731d9c86d12543b40;hpb=651116df95cb7e77f04d5a6411775c27f627d0ed;p=jquery.git diff --git a/src/fx/fx.js b/src/fx/fx.js index e6b5996..dd72c65 100644 --- a/src/fx/fx.js +++ b/src/fx/fx.js @@ -73,9 +73,11 @@ jQuery.fn.extend({ * * @name slideDown * @type jQuery - * @param Object speed A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). + * @param String|Number speed (optional) A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). * @param Function callback (optional) A function to be executed whenever the animation completes. * @cat Effects/Animations + * @see slideUp(String|Number,Function) + * @see slideToggle(String|Number,Function) */ slideDown: function(speed,callback){ return this.animate({height: "show"}, speed, callback); @@ -96,9 +98,11 @@ jQuery.fn.extend({ * * @name slideUp * @type jQuery - * @param Object speed A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). + * @param String|Number speed (optional) A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). * @param Function callback (optional) A function to be executed whenever the animation completes. * @cat Effects/Animations + * @see slideDown(String|Number,Function) + * @see slideToggle(String|Number,Function) */ slideUp: function(speed,callback){ return this.animate({height: "hide"}, speed, callback); @@ -119,11 +123,13 @@ jQuery.fn.extend({ * * @name slideToggle * @type jQuery - * @param Object speed A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). + * @param String|Number speed (optional) A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). * @param Function callback (optional) A function to be executed whenever the animation completes. * @cat Effects/Animations + * @see slideDown(String|Number,Function) + * @see slideUp(String|Number,Function) */ - slideToggle: function(speed,callback){ + slideToggle: function(speed, callback){ return this.each(function(){ var state = jQuery(this).is(":hidden") ? "show" : "hide"; jQuery(this).animate({height: state}, speed, callback); @@ -146,11 +152,13 @@ jQuery.fn.extend({ * * @name fadeIn * @type jQuery - * @param Object speed A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). + * @param String|Number speed (optional) A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). * @param Function callback (optional) A function to be executed whenever the animation completes. * @cat Effects/Animations + * @see fadeOut(String|Number,Function) + * @see fadeTo(String|Number,Number,Function) */ - fadeIn: function(speed,callback){ + fadeIn: function(speed, callback){ return this.animate({opacity: "show"}, speed, callback); }, @@ -170,11 +178,13 @@ jQuery.fn.extend({ * * @name fadeOut * @type jQuery - * @param Object speed A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). + * @param String|Number speed (optional) A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). * @param Function callback (optional) A function to be executed whenever the animation completes. * @cat Effects/Animations + * @see fadeIn(String|Number,Function) + * @see fadeTo(String|Number,Number,Function) */ - fadeOut: function(speed,callback){ + fadeOut: function(speed, callback){ return this.animate({opacity: "hide"}, speed, callback); }, @@ -194,10 +204,12 @@ jQuery.fn.extend({ * * @name fadeTo * @type jQuery - * @param Object speed A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). + * @param String|Number speed A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). * @param Number opacity The opacity to fade to (a number from 0 to 1). * @param Function callback (optional) A function to be executed whenever the animation completes. * @cat Effects/Animations + * @see fadeIn(String|Number,Function) + * @see fadeOut(String|Number,Function) */ fadeTo: function(speed,to,callback){ return this.animate({opacity: to}, speed, callback); @@ -226,8 +238,8 @@ jQuery.fn.extend({ * @name animate * @type jQuery * @param Hash params A set of style attributes that you wish to animate, and to what end. - * @param Object speed A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). - * @param Function callback A function to be executed whenever the animation completes. + * @param String|Number speed (optional) A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). + * @param Function callback (optional) A function to be executed whenever the animation completes. * @cat Effects/Animations */ animate: function(prop,speed,callback) {