Skip to content
2 changes: 1 addition & 1 deletion entries/add.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</signature>
<signature>
<added>1.3.2</added>
<argument name="jQuery object" type="jQuery object ">
<argument name="selection" type="jQuery">
<desc>An existing jQuery object to add to the set of matched elements.</desc>
</argument>
</signature>
Expand Down
5 changes: 4 additions & 1 deletion entries/addClass.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
</signature>
<signature>
<added>1.4</added>
<argument name="function(index, currentClass)" type="Function">
<argument name="function" type="Function">
<desc>A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, <code>this</code> refers to the current element in the set.</desc>
<argument name="index" type="Integer" />
<argument name="currentClassName" type="String" />
<return type="String"/>
</argument>
</signature>
<desc>Adds the specified class(es) to each of the set of matched elements.</desc>
Expand Down
9 changes: 8 additions & 1 deletion entries/after.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@
</signature>
<signature>
<added>1.4</added>
<argument name="function(index)" type="Function">
<argument name="function" type="Function">
<desc>A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, <code>this</code> refers to the current element in the set.</desc>
<argument name="index" type="Integer" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like append(), this also receives the html of the element as a second argument.

<argument name="html" type="String" />
<return>
<type name="htmlString"/>
<type name="Element"/>
<type name="jQuery"/>
</return>
</argument>
</signature>
<desc>Insert content, specified by the parameter, after each element in the set of matched elements.</desc>
Expand Down
5 changes: 4 additions & 1 deletion entries/ajaxComplete.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<title>.ajaxComplete()</title>
<signature>
<added>1.0</added>
<argument name="handler(event, XMLHttpRequest, ajaxOptions)" type="Function">
<argument name="handler" type="Function">
<argument name="event" type="Event" />
<argument name="jqXHR" type="jqXHR" />
<argument name="ajaxOptions" type="PlainObject" />
<desc>The function to be invoked.</desc>
</argument>
</signature>
Expand Down
6 changes: 5 additions & 1 deletion entries/ajaxError.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
<title>.ajaxError()</title>
<signature>
<added>1.0</added>
<argument name="handler(event, jqXHR, ajaxSettings, thrownError)" type="Function">
<argument name="handler" type="Function">
<desc>The function to be invoked.</desc>
<argument name="event" type="Event" />
<argument name="jqXHR" type="jqXHR" />
<argument name="ajaxSettings" type="PlainObject" />
<argument name="thrownError" type="String" />
</argument>
</signature>
<desc>Register a handler to be called when Ajax requests complete with an error. This is an <a href="/Ajax_Events/">Ajax Event</a>.</desc>
Expand Down
5 changes: 4 additions & 1 deletion entries/ajaxSend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
<title>.ajaxSend()</title>
<signature>
<added>1.0</added>
<argument name="handler(event, jqXHR, ajaxOptions)" type="Function">
<argument name="handler" type="Function">
<desc>The function to be invoked.</desc>
<argument name="event" type="Event" />
<argument name="jqXHR" type="jqXHR" />
<argument name="ajaxOptions" type="PlainObject" />
</argument>
</signature>
<desc>Attach a function to be executed before an Ajax request is sent. This is an <a href="/Ajax_Events/">Ajax Event</a>.</desc>
Expand Down
2 changes: 1 addition & 1 deletion entries/ajaxStart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<title>.ajaxStart()</title>
<signature>
<added>1.0</added>
<argument name="handler()" type="Function">
<argument name="handler" type="Function">
<desc>The function to be invoked.</desc>
</argument>
</signature>
Expand Down
2 changes: 1 addition & 1 deletion entries/ajaxStop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<desc>Register a handler to be called when all Ajax requests have completed. This is an <a href="/Ajax_Events/">Ajax Event</a>.</desc>
<signature>
<added>1.0</added>
<argument name="handler()" type="Function">
<argument name="handler" type="Function">
<desc>The function to be invoked.</desc>
</argument>
</signature>
Expand Down
6 changes: 5 additions & 1 deletion entries/ajaxSuccess.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
<title>.ajaxSuccess()</title>
<signature>
<added>1.0</added>
<argument name="handler(event, XMLHttpRequest, ajaxOptions)" type="Function">
<argument name="handler" type="Function">
<desc>The function to be invoked.</desc>
<argument name="event" type="Event" />
<argument name="jqXHR" type="jqXHR" />
<argument name="ajaxOptions" type="PlainObject" />
<argument name="data" type="PlainObject" />
</argument>
</signature>
<desc>Attach a function to be executed whenever an Ajax request completes successfully. This is an <a href="/Ajax_Events/">Ajax Event</a>.</desc>
Expand Down
9 changes: 8 additions & 1 deletion entries/append.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@
</signature>
<signature>
<added>1.4</added>
<argument name="function(index, html)" type="Function">
<argument name="function" type="Function">
<desc>A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, <code>this</code> refers to the current element in the set.</desc>
<argument name="index" type="Integer" />
<argument name="html" type="String" />
<return>
<type name="htmlString"/>
<type name="Element"/>
<type name="jQuery"/>
</return>
</argument>
</signature>
<desc>Insert content, specified by the parameter, to the end of each element in the set of matched elements.</desc>
Expand Down
8 changes: 7 additions & 1 deletion entries/attr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,14 @@ The title of the emphasis is:<div></div>
<argument name="attributeName" type="String">
<desc>The name of the attribute to set.</desc>
</argument>
<argument name="function(index, attr)" type="Function">
<argument name="function" type="Function">
<desc>A function returning the value to set. <code>this</code> is the current element. Receives the index position of the element in the set and the old attribute value as arguments.</desc>
<argument name="index" type="Integer" />
<argument name="attr" type="String" />
<return>
<type name="String"/>
<type name="Number"/>
</return>
</argument>
</signature>
<desc>Set one or more attributes for the set of matched elements.</desc>
Expand Down
7 changes: 7 additions & 0 deletions entries/before.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
<signature>
<added>1.4</added>
<argument name="function" type="Function">
<argument name="index" type="Integer" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This receives the html as a second argument.

<argument name="html" type="String" />
<return>
<type name="htmlString"/>
<type name="Element"/>
<type name="jQuery"/>
</return>
<desc>A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, <code>this</code> refers to the current element in the set.
</desc>
</argument>
Expand Down
3 changes: 2 additions & 1 deletion entries/bind.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
<argument name="eventData" type="Object" optional="true">
<desc>An object containing data that will be passed to the event handler.</desc>
</argument>
<argument name="handler(eventObject)" type="Function">
<argument name="handler" type="Function">
<desc>A function to execute each time the event is triggered.</desc>
<argument name="eventObject" type="Event" />
</argument>
</signature>
<signature>
Expand Down
6 changes: 4 additions & 2 deletions entries/blur.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@
<desc>Bind an event handler to the "blur" JavaScript event, or trigger that event on an element.</desc>
<signature>
<added>1.0</added>
<argument name="handler(eventObject)" type="Function">
<argument name="handler" type="Function">
<desc>A function to execute each time the event is triggered.</desc>
<argument name="eventObject" type="Event" />
</argument>
</signature>
<signature>
<added>1.4.3</added>
<argument name="eventData" type="Object" optional="true">
<desc>An object containing data that will be passed to the event handler.</desc>
</argument>
<argument name="handler(eventObject)" type="Function">
<argument name="handler" type="Function">
<desc>A function to execute each time the event is triggered.</desc>
<argument name="eventObject" type="Event" />
</argument>
</signature>
<signature>
Expand Down
6 changes: 4 additions & 2 deletions entries/change.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@
<desc>Bind an event handler to the "change" JavaScript event, or trigger that event on an element.</desc>
<signature>
<added>1.0</added>
<argument name="handler(eventObject)" type="Function">
<argument name="handler" type="Function">
<desc>A function to execute each time the event is triggered.</desc>
<argument name="eventObject" type="Event" />
</argument>
</signature>
<signature>
<added>1.4.3</added>
<argument name="eventData" type="Object" optional="true">
<desc>An object containing data that will be passed to the event handler.</desc>
</argument>
<argument name="handler(eventObject)" type="Function">
<argument name="handler" type="Function">
<desc>A function to execute each time the event is triggered.</desc>
<argument name="eventObject" type="Event" />
</argument>
</signature>
<signature>
Expand Down
6 changes: 4 additions & 2 deletions entries/click.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@
<desc>Bind an event handler to the "click" JavaScript event, or trigger that event on an element.</desc>
<signature>
<added>1.0</added>
<argument name="handler(eventObject)" type="Function">
<argument name="handler" type="Function">
<desc>A function to execute each time the event is triggered.</desc>
<argument name="eventObject" type="Event" />
</argument>
</signature>
<signature>
<added>1.4.3</added>
<argument name="eventData" type="Object" optional="true">
<desc>An object containing data that will be passed to the event handler.</desc>
</argument>
<argument name="handler(eventObject)" type="Function">
<argument name="handler" type="Function">
<desc>A function to execute each time the event is triggered.</desc>
<argument name="eventObject" type="Event" />
</argument>
</signature>
<signature>
Expand Down
2 changes: 1 addition & 1 deletion entries/closest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</signature>
<signature>
<added>1.6</added>
<argument name="jQuery object" type="jQuery">
<argument name="selection" type="jQuery">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain the purpose of this change? I'm not seeing any effect that it's having.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose is to avoid confusion when reading the example by using a proper variable name (no spaces). There was a discussion about what that name should be (I think in IRC) and I believe we opted for selection, though I believe even within this PR there are inconsistencies.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like @esx added this commit after I last pulled in this branch. That's why I wasn't seeing the changes in my local environment. @esx could you make a pass of this and make sure that you're being consistent with "selection"?

Thanks.

<desc>A jQuery object to match elements against.</desc>
</argument>
</signature>
Expand Down
8 changes: 7 additions & 1 deletion entries/css.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,14 @@ $( "div" ).click(function() {
<argument name="propertyName" type="String">
<desc>A CSS property name.</desc>
</argument>
<argument name="function(index, value)" type="Function">
<argument name="function" type="Function">
<desc>A function returning the value to set. <code>this</code> is the current element. Receives the index position of the element in the set and the old value as arguments.</desc>
<argument name="index" type="Integer" />
<argument name="value" type="String" />
<return>
<type name="String"/>
<type name="Number"/>
</return>
</argument>
</signature>
<signature>
Expand Down
6 changes: 4 additions & 2 deletions entries/dblclick.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@
<desc>Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element.</desc>
<signature>
<added>1.0</added>
<argument name="handler(eventObject)" type="Function">
<argument name="handler" type="Function">
<desc>A function to execute each time the event is triggered.</desc>
<argument name="eventObject" type="Event" />
</argument>
</signature>
<signature>
<added>1.4.3</added>
<argument name="eventData" type="Object" optional="true">
<desc>An object containing data that will be passed to the event handler.</desc>
</argument>
<argument name="handler(eventObject)" type="Function">
<argument name="handler" type="Function">
<desc>A function to execute each time the event is triggered.</desc>
<argument name="eventObject" type="Event" />
</argument>
</signature>
<signature>
Expand Down
6 changes: 4 additions & 2 deletions entries/delegate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
<argument name="eventType" type="String">
<desc>A string containing one or more space-separated JavaScript event types, such as "click" or "keydown," or custom event names.</desc>
</argument>
<argument name="handler(eventObject)" type="Function">
<argument name="handler" type="Function">
<desc>A function to execute at the time the event is triggered.</desc>
<argument name="eventObject" type="Event" />
</argument>
</signature>
<signature>
Expand All @@ -25,8 +26,9 @@
<argument name="eventData" type="Object">
<desc>An object containing data that will be passed to the event handler.</desc>
</argument>
<argument name="handler(eventObject)" type="Function">
<argument name="handler" type="Function">
<desc>A function to execute at the time the event is triggered.</desc>
<argument name="eventObject" type="Event" />
</argument>
</signature>
<signature>
Expand Down
4 changes: 3 additions & 1 deletion entries/each.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
<title>.each()</title>
<signature>
<added>1.0</added>
<argument name="function(index, Element)" type="Function">
<argument name="function" type="Function">
<desc>A function to execute for each matched element.</desc>
<argument name="index" type="Integer" />
<argument name="element" type="Element" />
</argument>
</signature>
<desc>Iterate over a jQuery object, executing a function for each matched element. </desc>
Expand Down
2 changes: 1 addition & 1 deletion entries/eq-selector.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<signature>
<sample>:eq(-index)</sample>
<added>1.8</added>
<argument name="-index" type="Integer">
<argument name="indexFromEnd" type="Integer">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm missing something but I'm not seeing any effect of these name changes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as "jQuery object" to "selection", this is just to produce valid variable names in the signatures.

<desc>Zero-based index of the element to match, counting backwards from the last element. </desc>
</argument>
</signature>
Expand Down
2 changes: 1 addition & 1 deletion entries/eq.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</signature>
<signature>
<added>1.4</added>
<argument name="-index" type="Integer">
<argument name="indexFromEnd" type="Integer">
<desc>An integer indicating the position of the element, counting backwards from the last element in the set. </desc>
</argument>
</signature>
Expand Down
6 changes: 4 additions & 2 deletions entries/error.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@
<desc>Bind an event handler to the "error" JavaScript event.</desc>
<signature>
<added>1.0</added>
<argument name="handler(eventObject)" type="Function">
<argument name="handler" type="Function">
<desc>A function to execute when the event is triggered.</desc>
<argument name="eventObject" type="Event" />
</argument>
</signature>
<signature>
<added>1.4.3</added>
<argument name="eventData" type="Object" optional="true">
<desc>An object containing data that will be passed to the event handler.</desc>
</argument>
<argument name="handler(eventObject)" type="Function">
<argument name="handler" type="Function">
<desc>A function to execute each time the event is triggered.</desc>
<argument name="eventObject" type="Event" />
</argument>
</signature>
<longdesc>
Expand Down
7 changes: 5 additions & 2 deletions entries/filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
</signature>
<signature>
<added>1.0</added>
<argument name="function(index)" type="Function">
<argument name="function" type="Function">
<desc>A function used as a test for each element in the set. <code>this</code> is the current DOM element.</desc>
<argument name="index" type="Integer" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function receives the element as a second argument.

<argument name="element" type="Element" />
<return type="Boolean" />
</argument>
</signature>
<signature>
Expand All @@ -21,7 +24,7 @@
</signature>
<signature>
<added>1.4</added>
<argument name="jQuery object" type="Object">
<argument name="selection" type="jQuery">
<desc>An existing jQuery object to match the current set of elements against.</desc>
</argument>
</signature>
Expand Down
2 changes: 1 addition & 1 deletion entries/find.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</signature>
<signature>
<added>1.6</added>
<argument name="jQuery object" type="Object">
<argument name="selection" type="jQuery">
<desc>A jQuery object to match elements against.</desc>
</argument>
</signature>
Expand Down
Loading