PluginProbe
RSVP and Event Management / 1.3.0
RSVP and Event Management v1.3.0
trunk 0.5.0 0.6.0 0.7.0 0.8.0 0.9.0 0.9.5 1.0.0 1.1.0 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.5.0 1.6.0 1.6.1 1.6.2 1.6.5 1.7.0 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 All 136 releases
rsvp / jquery-ui-1.7.2.custom / development-bundle / docs / toggle.html

toggle.html in RSVP and Event Management 1.3.0, at jquery-ui-1.7.2.custom/development-bundle/docs/toggle.html

144 lines 5.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1
2 <ul class="UIAPIPlugin-toc">
3 <li><a href="#overview">Overview</a></li>
4 <li><a href="#options">Arguments</a></li>
5 </ul>
6 <div class="UIAPIPlugin">
7 <h1>jQuery UI toggle</h1>
8 <div id="overview">
9 <h2 class="top-header">Overview</h2>
10 <div id="overview-main">
11 <div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/toggle?section=1" title="Edit section: toggle( effect, [options], [speed], [callback] )">edit</a>]</div><a name="toggle.28_effect.2C_.5Boptions.5D.2C_.5Bspeed.5D.2C_.5Bcallback.5D_.29"></a><h3>toggle( effect, <span class="optional">[</span>options<span class="optional">]</span>, <span class="optional">[</span>speed<span class="optional">]</span>, <span class="optional">[</span>callback<span class="optional">]</span> )</h3>
12 <p>The enhanced toggle method optionally accepts jQuery UI advanced effects.</p>
13 <p>Uses a specific effect on an element to toggle the element if the first argument is an effect string.</p>
14 </div>
15 <div id="overview-dependencies">
16 <h3>Dependencies</h3>
17 <ul>
18 <li>Effects Core</li>
19 </ul>
20 </div>
21 <div id="overview-example">
22 <h3>Example</h3>
23 <div id="overview-example" class="example">
24 <ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
25 <p><div id="demo" class="tabs-container" rel="170">
26 Apply the effect slide if you click on the p to toggle a div.<br />
27 </p>
28 <pre>$(&quot;p&quot;).<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
29 $(&quot;div&quot;).<strong class="selflink">toggle</strong>(&quot;slide&quot;, {}, 1000);
30 });
31 </pre>
32 <p></div><div id="source" class="tabs-container">
33 </p>
34 <pre>&lt;!DOCTYPE html&gt;
35 &lt;html&gt;
36 &lt;head&gt;
37 &lt;link type=&quot;text/css&quot; href=&quot;http://jqueryui.com/latest/themes/base/ui.all.css&quot; rel=&quot;stylesheet&quot; /&gt;
38 &lt;script type=&quot;text/javascript&quot; src=&quot;http://jqueryui.com/latest/jquery-1.3.2.js&quot;&gt;&lt;/script&gt;
39 &lt;script src=&quot;http://ui.jquery.com/latest/ui/effects.core.js&quot;&gt;&lt;/script&gt;
40 &lt;script src=&quot;http://ui.jquery.com/latest/ui/effects.slide.js&quot;&gt;&lt;/script&gt;
41 &lt;style type=&quot;text/css&quot;&gt;
42 div { display: none; margin: 0px; width: 100px; height: 80px; background: blue; position: relative; }
43 &lt;/style&gt;
44 &lt;script type="text/javascript"&gt;
45 $(document).ready(function(){
46 $(&quot;p&quot;).<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
47 $(&quot;div&quot;).<strong class="selflink">toggle</strong>(&quot;slide&quot;, {}, 1000);
48 });
49 });
50 &lt;/script&gt;
51 &lt;/head&gt;
52 &lt;body style="font-size:62.5%;"&gt;
53
54 &lt;p&gt;Click me&lt;/p&gt;&lt;div&gt;&lt;/div&gt;
55
56 &lt;/body&gt;
57 &lt;/html&gt;
58 </pre>
59 <p></div>
60 </p><p></div>
61 </div>
62 </div>
63 <div id="options">
64 <h2 class="top-header">Arguments</h2>
65 <ul class="options-list">
66
67 <li class="option" id="option-effect">
68 <div class="option-header">
69 <h3 class="option-name"><a href="#option-effect">effect</a></h3>
70 <dl>
71 <dt class="option-type-label">Type:</dt>
72 <dd class="option-type">String</dd>
73
74 </dl>
75 </div>
76 <div class="option-description">
77 <p>The effect to be used. Possible values: 'blind', 'clip', 'drop', 'explode', 'fold', 'puff', 'slide', 'scale', 'size', 'pulsate'.</p>
78 </div>
79 </li>
80
81
82 <li class="option" id="option-options">
83 <div class="option-header">
84 <h3 class="option-name"><a href="#option-options">options</a></h3>
85 <dl>
86 <dt class="option-type-label">Type:</dt>
87 <dd class="option-type">Hash</dd>
88
89 <dt class="option-optional-label">Optional</dt>
90
91 </dl>
92 </div>
93 <div class="option-description">
94 <p>A object/hash including specific options for the effect.</p>
95 </div>
96 </li>
97
98
99 <li class="option" id="option-speed">
100 <div class="option-header">
101 <h3 class="option-name"><a href="#option-speed">speed</a></h3>
102 <dl>
103 <dt class="option-type-label">Type:</dt>
104 <dd class="option-type">String, Number</dd>
105
106 <dt class="option-optional-label">Optional</dt>
107
108 </dl>
109 </div>
110 <div class="option-description">
111 <p>A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
112 </div>
113 </li>
114
115
116 <li class="option" id="option-callback">
117 <div class="option-header">
118 <h3 class="option-name"><a href="#option-callback">callback</a></h3>
119 <dl>
120 <dt class="option-type-label">Type:</dt>
121 <dd class="option-type">Function</dd>
122
123 <dt class="option-optional-label">Optional</dt>
124
125 </dl>
126 </div>
127 <div class="option-description">
128 <p>A function that is called after the effect is completed.</p>
129 </div>
130 </li>
131
132 </ul>
133 </div>
134 </div>
135
136 </p><!--
137 Pre-expand include size: 6229 bytes
138 Post-expand include size: 8801 bytes
139 Template argument size: 5539 bytes
140 Maximum: 2097152 bytes
141 -->
142
143 <!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2615-1!1!0!!en!2 and timestamp 20090604035835 -->
144