Skip to content

Commit 9560239

Browse files
committed
jQuery.speed: Created entry
Fixes gh-830 Closes gh-849
1 parent 8868add commit 9560239

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

entries/jQuery.speed.xml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0"?>
2+
<entry type="method" name="jQuery.speed" return="PlainObject">
3+
<title>jQuery.speed</title>
4+
<desc>Creates an object containing a set of properties ready to be used in the definition of custom animations.</desc>
5+
<signature>
6+
<added>1.0</added>
7+
<xi:include href="../includes/duration-argument.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
8+
<argument name="settings" type="PlainObject" optional="true">
9+
<property name="easing" type="String" default="swing" optional="true">
10+
<desc>A string indicating which easing function to use for the transition.</desc>
11+
</property>
12+
<property name="complete" type="Function" optional="true">
13+
<desc>A function to call once the animation is complete.</desc>
14+
</property>
15+
</argument>
16+
</signature>
17+
<signature>
18+
<added>1.1</added>
19+
<xi:include href="../includes/duration-argument.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
20+
<xi:include href="../includes/easing-argument.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
21+
<xi:include href="../includes/complete-argument.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
22+
</signature>
23+
<signature>
24+
<added>1.1</added>
25+
<argument name="settings" type="PlainObject">
26+
<property name="duration" default="400" optional="true">
27+
<desc>A string or number determining how long the animation will run.</desc>
28+
<type name="Number"/>
29+
<type name="String"/>
30+
</property>
31+
<property name="easing" type="String" default="swing" optional="true">
32+
<desc>A string indicating which easing function to use for the transition.</desc>
33+
</property>
34+
<property name="complete" type="Function" optional="true">
35+
<desc>A function to call once the animation is complete.</desc>
36+
</property>
37+
</argument>
38+
</signature>
39+
<longdesc>
40+
<p>The <code>$.speed()</code> method provides a way to define properties, such as <code>duration</code>, <code>easing</code>, and <code>queue</code>, to use in a custom animation. By using it, you don't have to implement the logic that deals with default values and optional parameters.</p>
41+
<p>This method is meant for plugin developers who are creating new animation methods. Letting <code>$.speed()</code> do all the parameter hockey and normalization for you, rather than duplicating the logic yourself, makes your work simpler. An example of use can be found in the animated form of <code>.addClass()</code> of jQuery UI. </p>
42+
</longdesc>
43+
<category slug="effects/custom"/>
44+
<category slug="version/1.0"/>
45+
<category slug="version/1.1"/>
46+
</entry>

0 commit comments

Comments
 (0)