Skip to content

Commit

Permalink
Class Animation: Document alternative object hash based signature. Fixes
Browse files Browse the repository at this point in the history
 #101 - Document children option for class animation methods.
  • Loading branch information
tjvantoll authored and scottgonzalez committed May 6, 2013
1 parent 4f69c59 commit b26f292
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 0 deletions.
6 changes: 6 additions & 0 deletions entries/addClass.xml
Expand Up @@ -14,6 +14,12 @@
<xi:include href="../includes/animation-argument-easing.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../includes/animation-argument-complete.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</signature>
<signature>
<argument name="className" type="String">
<desc>One or more class names (space separated) to be added to the class attribute of each matched element.</desc>
</argument>
<xi:include href="../includes/class-animation-argument-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</signature>
<example>
<desc>Adds the class "big-blue" to the matched elements.</desc>
<css><![CDATA[
Expand Down
6 changes: 6 additions & 0 deletions entries/removeClass.xml
Expand Up @@ -14,6 +14,12 @@
<xi:include href="../includes/animation-argument-easing.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../includes/animation-argument-complete.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</signature>
<signature>
<argument name="className" type="String">
<desc>One or more class names (space separated) to be removed from the class attribute of each matched element.</desc>
</argument>
<xi:include href="../includes/class-animation-argument-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</signature>
<example>
<desc>Removes the class "big-blue" from the matched elements.</desc>
<css><![CDATA[
Expand Down
9 changes: 9 additions & 0 deletions entries/switchClass.xml
Expand Up @@ -18,6 +18,15 @@
<xi:include href="../includes/animation-argument-easing.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../includes/animation-argument-complete.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</signature>
<signature>
<argument name="removeClassName" type="String">
<desc>One or more class names (space separated) to be removed from the class attribute of each matched element.</desc>
</argument>
<argument name="addClassName" type="String">
<desc>One or more class names (space separated) to be added to the class attribute of each matched element.</desc>
</argument>
<xi:include href="../includes/class-animation-argument-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</signature>
<example>
<height>220</height>
<desc>Adds the class "blue" and removes the class "big" from the matched elements.</desc>
Expand Down
9 changes: 9 additions & 0 deletions entries/toggleClass.xml
Expand Up @@ -17,6 +17,15 @@
<xi:include href="../includes/animation-argument-easing.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../includes/animation-argument-complete.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</signature>
<signature>
<argument name="className" type="String">
<desc>One or more class names (space separated) to be toggled for each element in the matched set.</desc>
</argument>
<argument name="switch" type="Boolean" optional="true">
<desc>A boolean value to determine whether the class should be added or removed.</desc>
</argument>
<xi:include href="../includes/class-animation-argument-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</signature>
<example>
<height>220</height>
<desc>Toggles the class "big-blue" for the matched elements.</desc>
Expand Down
22 changes: 22 additions & 0 deletions includes/class-animation-argument-options.xml
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<argument name="options" type="Object" optional="true">
<desc>All animation settings. All properties are optional.</desc>
<property name="duration" default="400" optional="true">
<desc>A string or number determining how long the animation will run.</desc>
<type name="Number">
<desc>The duration in milliseconds.</desc>
</type>
<type name="String">
<desc>The strings <code>"fast"</code> and <code>"slow"</code> can be supplied to indicate durations of 200 and 600 milliseconds, respectively.</desc>
</type>
</property>
<property name="easing" type="String" default="swing" optional="true">
<desc>A string indicating which <a href="/easings/">easing</a> function to use for the transition.</desc>
</property>
<property name="complete" type="Function" optional="true">
<desc>A function to call once the animation is complete.</desc>
</property>
<property name="children" type="Boolean" default="false">
<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>
</property>
</argument>

0 comments on commit b26f292

Please sign in to comment.