Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 62 lines (61 sloc) 2.157 kB
c74a62e @scottgonzalez Added .show(), .hide(), .toggle().
scottgonzalez authored
1 <?xml version="1.0"?>
2 <entry name="toggle" type="method" return="jQuery">
3 <title>.toggle()</title>
4 <desc>Display or hide the matched elements, using custom effects.</desc>
5 <longdesc>
6 <xi:include href="../includes/core-extension-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
7 </longdesc>
8 <signature>
9 <argument name="effect" type="String">
10 <desc>A string indicating which <a href="/category/effect/">effect</a> to use for the transition.</desc>
11 </argument>
12 <argument name="options" type="Object" optional="true">
d866e78 @scottgonzalez Link to easings page whenever mentioning easings.
scottgonzalez authored
13 <desc>Effect-specific settings and <a href="/easings/">easing</a>.</desc>
c74a62e @scottgonzalez Added .show(), .hide(), .toggle().
scottgonzalez authored
14 </argument>
15 <xi:include href="../includes/animation-argument-duration.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
16 <xi:include href="../includes/animation-argument-complete.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
17 </signature>
18 <signature>
19 <argument name="options" type="Object">
20 <desc>All animation settings. The only required property is <code>effect</code>.</desc>
21 <property name="effect" type="String">
22 <desc>A string indicating which <a href="/category/effect/">effect</a> to use for the transition.</desc>
23 </property>
24 <property name="easing" type="String">
d866e78 @scottgonzalez Link to easings page whenever mentioning easings.
scottgonzalez authored
25 <desc>A string indicating which <a href="/easings/">easing</a> function to use for the transition.</desc>
c74a62e @scottgonzalez Added .show(), .hide(), .toggle().
scottgonzalez authored
26 </property>
27 <property name="duration">
28 <desc>A string or number determining how long the animation will run.</desc>
29 <type name="Number"/>
30 <type name="String"/>
31 </property>
32 <property name="complete" type="Function">
33 <desc>A function to call once the animation is complete.</desc>
34 </property>
35 </argument>
36 </signature>
37 <example>
136df88 @scottgonzalez Adjusted demo heights.
scottgonzalez authored
38 <height>150</height>
c74a62e @scottgonzalez Added .show(), .hide(), .toggle().
scottgonzalez authored
39 <desc>Toggle a div using the fold effect.</desc>
40 <css><![CDATA[
41 div {
42 width: 100px;
43 height: 100px;
44 background: #ccc;
45 border: 1px solid #000;
46 }
47 ]]></css>
48 <html><![CDATA[
49 <button>toggle the div</button>
50 <div></div>
51 ]]></html>
52 <code><![CDATA[
53 $( "button" ).click(function() {
54 $( "div" ).toggle( "fold", 1000 );
55 });
56 ]]></code>
57 </example>
58 <category slug="methods"/>
59 <category slug="effects"/>
870a893 @scottgonzalez Added method overrides category.
scottgonzalez authored
60 <category slug="overrides"/>
c74a62e @scottgonzalez Added .show(), .hide(), .toggle().
scottgonzalez authored
61 </entry>
Something went wrong with that request. Please try again.