Skip to content
Permalink
Browse files

Improved docs for FX module, merging method descriptions and marking …

…optional arguments
  • Loading branch information
jzaefferer committed Jan 2, 2007
1 parent 9c07326 commit 651116df95cb7e77f04d5a6411775c27f627d0ed
Showing with 41 additions and 121 deletions.
  1. +5 −3 newandnoteworthy.txt
  2. +36 −118 src/fx/fx.js
@@ -1,14 +1,14 @@
New and Noteworthy
-----------------

1.0.5/1.1
1.1
-----

- Massive speed-ups (4x-10x) in the selector engine
- Fixed synchronous requests
- $.get, $.getIfModified, $.post, $.getScript and $.getJSON now all pass through the XMLHttpRequest as returned by $.ajax
- Improved AJAX docs (eg. more examples for $.ajax
- Improved event fixingFixed event fixing (Opera provides event.srcElement, must ignore it if target is available; only create pageX if clientX is available)
- Improved AJAX docs (eg. more examples for $.ajax)
- Improved event fixing (Opera provides event.srcElement, must ignore it if target is available; only create pageX if clientX is available)
- Fixed ID with context selectors (eg. div #id doesn't ignore "div" anymore)
- Fixed nth-child selectors to start on the right number
- Improved jQuery.merge to avoid unnecessary loops
@@ -17,6 +17,8 @@ New and Noteworthy
- Implemented a better error handling for ajax requests. Exceptions caused by dropping connections are now handled, too.
- Added global settings for AJAX (in addition to timeout), use $.ajaxSetup() to modify them
- You can now unbind event handlers from within themselves
- Documented filter(Function)
- Improved docs for FX module, merging method descriptions and marking optional arguments

1.0.4
-----
@@ -4,33 +4,24 @@ jQuery.fn.extend({
_show: jQuery.fn.show,

/**
* Show all matched elements using a graceful animation.
* Show all matched elements using a graceful animation and firing an
* optional callback after completion.
*
* The height, width, and opacity of each of the matched elements
* are changed dynamically according to the specified speed.
*
* @example $("p").show("slow");
*
* @name show
* @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).
* @cat Effects/Animations
*/

/**
* Show all matched elements using a graceful animation and firing a callback
* function after completion.
* The height, width, and opacity of each of the matched elements
* are changed dynamically according to the specified speed.
*
* @example $("p").show("slow",function(){
* alert("Animation Done.");
* });
*
* @name show
* @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 Function callback A function to be executed whenever the animation completes.
* @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 Function callback (optional) A function to be executed whenever the animation completes.
* @cat Effects/Animations
* @see hide(String|Number,Function)
*/
show: function(speed,callback){
return speed ? this.animate({
@@ -42,33 +33,24 @@ jQuery.fn.extend({
_hide: jQuery.fn.hide,

/**
* Hide all matched elements using a graceful animation.
* Hide all matched elements using a graceful animation and firing an
* optional callback after completion.
*
* The height, width, and opacity of each of the matched elements
* are changed dynamically according to the specified speed.
*
* @example $("p").hide("slow");
*
* @name hide
* @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).
* @cat Effects/Animations
*/

/**
* Hide all matched elements using a graceful animation and firing a callback
* function after completion.
* The height, width, and opacity of each of the matched elements
* are changed dynamically according to the specified speed.
*
* @example $("p").hide("slow",function(){
* alert("Animation Done.");
* });
*
* @name hide
* @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 Function callback A function to be executed whenever the animation completes.
* @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 Function callback (optional) A function to be executed whenever the animation completes.
* @cat Effects/Animations
* @see show(String|Number,Function)
*/
hide: function(speed,callback){
return speed ? this.animate({
@@ -77,98 +59,68 @@ jQuery.fn.extend({
},

/**
* Reveal all matched elements by adjusting their height.
* Reveal all matched elements by adjusting their height and firing an
* optional callback after completion.
*
* Only the height is adjusted for this animation, causing all matched
* elements to be revealed in a "sliding" manner.
*
* @example $("p").slideDown("slow");
*
* @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).
* @cat Effects/Animations
*/

/**
* Reveal all matched elements by adjusting their height and firing a callback
* function after completion.
* Only the height is adjusted for this animation, causing all matched
* elements to be revealed in a "sliding" manner.
*
* @example $("p").slideDown("slow",function(){
* alert("Animation Done.");
* });
*
* @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 Function callback A function to be executed whenever the animation completes.
* @param Function callback (optional) A function to be executed whenever the animation completes.
* @cat Effects/Animations
*/
slideDown: function(speed,callback){
return this.animate({height: "show"}, speed, callback);
},

/**
* Hide all matched elements by adjusting their height.
* Hide all matched elements by adjusting their height and firing an
* optional callback after completion.
*
* Only the height is adjusted for this animation, causing all matched
* elements to be hidden in a "sliding" manner.
*
* @example $("p").slideUp("slow");
*
* @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).
* @cat Effects/Animations
*/

/**
* Hide all matched elements by adjusting their height and firing a callback
* function after completion.
* Only the height is adjusted for this animation, causing all matched
* elements to be hidden in a "sliding" manner.
*
* @example $("p").slideUp("slow",function(){
* alert("Animation Done.");
* });
*
* @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 Function callback A function to be executed whenever the animation completes.
* @param Function callback (optional) A function to be executed whenever the animation completes.
* @cat Effects/Animations
*/
slideUp: function(speed,callback){
return this.animate({height: "hide"}, speed, callback);
},

/**
* Toggle the visibility of all matched elements by adjusting their height.
* Toggle the visibility of all matched elements by adjusting their height and firing an
* optional callback after completion.
*
* Only the height is adjusted for this animation, causing all matched
* elements to be hidden in a "sliding" manner.
*
* @example $("p").slideToggle("slow");
*
* @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).
* @cat Effects/Animations
*/

/**
* Toggle the visibility of all matched elements by adjusting their height
* and firing a callback function after completion.
* Only the height is adjusted for this animation, causing all matched
* elements to be hidden in a "sliding" manner.
*
* @example $("p").slideToggle("slow",function(){
* alert("Animation Done.");
* });
*
* @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 Function callback A function to be executed whenever the animation completes.
* @param Function callback (optional) A function to be executed whenever the animation completes.
* @cat Effects/Animations
*/
slideToggle: function(speed,callback){
@@ -179,97 +131,63 @@ jQuery.fn.extend({
},

/**
* Fade in all matched elements by adjusting their opacity.
* Fade in all matched elements by adjusting their opacity and firing an
* optional callback after completion.
*
* Only the opacity is adjusted for this animation, meaning that
* all of the matched elements should already have some form of height
* and width associated with them.
*
* @example $("p").fadeIn("slow");
*
* @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).
* @cat Effects/Animations
*/

/**
* Fade in all matched elements by adjusting their opacity and firing a
* callback function after completion.
* Only the opacity is adjusted for this animation, meaning that
* all of the matched elements should already have some form of height
* and width associated with them.
*
* @example $("p").fadeIn("slow",function(){
* alert("Animation Done.");
* });
*
* @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 Function callback A function to be executed whenever the animation completes.
* @param Function callback (optional) A function to be executed whenever the animation completes.
* @cat Effects/Animations
*/
fadeIn: function(speed,callback){
return this.animate({opacity: "show"}, speed, callback);
},

/**
* Fade out all matched elements by adjusting their opacity.
* Fade out all matched elements by adjusting their opacity and firing an
* optional callback after completion.
*
* Only the opacity is adjusted for this animation, meaning that
* all of the matched elements should already have some form of height
* and width associated with them.
*
* @example $("p").fadeOut("slow");
*
* @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).
* @cat Effects/Animations
*/

/**
* Fade out all matched elements by adjusting their opacity and firing a
* callback function after completion.
* Only the opacity is adjusted for this animation, meaning that
* all of the matched elements should already have some form of height
* and width associated with them.
*
* @example $("p").fadeOut("slow",function(){
* alert("Animation Done.");
* });
*
* @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 Function callback A function to be executed whenever the animation completes.
* @param Function callback (optional) A function to be executed whenever the animation completes.
* @cat Effects/Animations
*/
fadeOut: function(speed,callback){
return this.animate({opacity: "hide"}, speed, callback);
},

/**
* Fade the opacity of all matched elements to a specified opacity.
* Fade the opacity of all matched elements to a specified opacity and firing an
* optional callback after completion.
*
* Only the opacity is adjusted for this animation, meaning that
* all of the matched elements should already have some form of height
* and width associated with them.
*
* @example $("p").fadeTo("slow", 0.5);
*
* @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 Number opacity The opacity to fade to (a number from 0 to 1).
* @cat Effects/Animations
*/

/**
* Fade the opacity of all matched elements to a specified opacity and
* firing a callback function after completion.
* Only the opacity is adjusted for this animation, meaning that
* all of the matched elements should already have some form of height
* and width associated with them.
*
* @example $("p").fadeTo("slow", 0.5, function(){
* alert("Animation Done.");
* });
@@ -278,7 +196,7 @@ jQuery.fn.extend({
* @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 Number opacity The opacity to fade to (a number from 0 to 1).
* @param Function callback A function to be executed whenever the animation completes.
* @param Function callback (optional) A function to be executed whenever the animation completes.
* @cat Effects/Animations
*/
fadeTo: function(speed,to,callback){

0 comments on commit 651116d

Please sign in to comment.
You can’t perform that action at this time.