Skip to content

Commit b26f292

Browse files
tjvantollscottgonzalez
authored andcommitted
Class Animation: Document alternative object hash based signature. Fixes jquery#101 - Document children option for class animation methods.
1 parent 4f69c59 commit b26f292

File tree

5 files changed

+52
-0
lines changed

5 files changed

+52
-0
lines changed

entries/addClass.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
<xi:include href="../includes/animation-argument-easing.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
1515
<xi:include href="../includes/animation-argument-complete.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
1616
</signature>
17+
<signature>
18+
<argument name="className" type="String">
19+
<desc>One or more class names (space separated) to be added to the class attribute of each matched element.</desc>
20+
</argument>
21+
<xi:include href="../includes/class-animation-argument-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
22+
</signature>
1723
<example>
1824
<desc>Adds the class "big-blue" to the matched elements.</desc>
1925
<css><![CDATA[

entries/removeClass.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
<xi:include href="../includes/animation-argument-easing.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
1515
<xi:include href="../includes/animation-argument-complete.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
1616
</signature>
17+
<signature>
18+
<argument name="className" type="String">
19+
<desc>One or more class names (space separated) to be removed from the class attribute of each matched element.</desc>
20+
</argument>
21+
<xi:include href="../includes/class-animation-argument-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
22+
</signature>
1723
<example>
1824
<desc>Removes the class "big-blue" from the matched elements.</desc>
1925
<css><![CDATA[

entries/switchClass.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818
<xi:include href="../includes/animation-argument-easing.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
1919
<xi:include href="../includes/animation-argument-complete.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
2020
</signature>
21+
<signature>
22+
<argument name="removeClassName" type="String">
23+
<desc>One or more class names (space separated) to be removed from the class attribute of each matched element.</desc>
24+
</argument>
25+
<argument name="addClassName" type="String">
26+
<desc>One or more class names (space separated) to be added to the class attribute of each matched element.</desc>
27+
</argument>
28+
<xi:include href="../includes/class-animation-argument-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
29+
</signature>
2130
<example>
2231
<height>220</height>
2332
<desc>Adds the class "blue" and removes the class "big" from the matched elements.</desc>

entries/toggleClass.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@
1717
<xi:include href="../includes/animation-argument-easing.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
1818
<xi:include href="../includes/animation-argument-complete.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
1919
</signature>
20+
<signature>
21+
<argument name="className" type="String">
22+
<desc>One or more class names (space separated) to be toggled for each element in the matched set.</desc>
23+
</argument>
24+
<argument name="switch" type="Boolean" optional="true">
25+
<desc>A boolean value to determine whether the class should be added or removed.</desc>
26+
</argument>
27+
<xi:include href="../includes/class-animation-argument-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
28+
</signature>
2029
<example>
2130
<height>220</height>
2231
<desc>Toggles the class "big-blue" for the matched elements.</desc>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0"?>
2+
<argument name="options" type="Object" optional="true">
3+
<desc>All animation settings. All properties are optional.</desc>
4+
<property name="duration" default="400" optional="true">
5+
<desc>A string or number determining how long the animation will run.</desc>
6+
<type name="Number">
7+
<desc>The duration in milliseconds.</desc>
8+
</type>
9+
<type name="String">
10+
<desc>The strings <code>"fast"</code> and <code>"slow"</code> can be supplied to indicate durations of 200 and 600 milliseconds, respectively.</desc>
11+
</type>
12+
</property>
13+
<property name="easing" type="String" default="swing" optional="true">
14+
<desc>A string indicating which <a href="/easings/">easing</a> function to use for the transition.</desc>
15+
</property>
16+
<property name="complete" type="Function" optional="true">
17+
<desc>A function to call once the animation is complete.</desc>
18+
</property>
19+
<property name="children" type="Boolean" default="false">
20+
<desc>Whether the animation should additionally be applied to all descendants of the matched elements. This feature should be used with caution as the cost of determining which descendants to animate can be very expensive, and grows linearly with the number of descendants.</desc>
21+
</property>
22+
</argument>

0 commit comments

Comments
 (0)