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 / toggleClass.html

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

111 lines 3.9 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 toggleClass</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/toggleClass?section=1" title="Edit section: toggleClass( class, [duration] )">edit</a>]</div><a name="toggleClass.28_class.2C_.5Bduration.5D_.29"></a><h3>toggleClass( class, <span class="optional">[</span>duration<span class="optional">]</span> )</h3>
12 <p>Adds the specified class if it is not present, and removes the specified class if it is present, using an optional transition.</p>
13 </div>
14 <div id="overview-dependencies">
15 <h3>Dependencies</h3>
16 <ul>
17 <li>Effects Core</li>
18 </ul>
19 </div>
20 <div id="overview-example">
21 <h3>Example</h3>
22 <div id="overview-example" class="example">
23 <ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
24 <p><div id="demo" class="tabs-container" rel="100">
25 Adds the 'selected' class if it is not present, and removes the 'selected' class if it is present.<br />
26 </p>
27 <pre>$(&quot;p&quot;).<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
28 $(this).<strong class="selflink">toggleClass</strong>(&quot;selected&quot;, 1000);
29 });
30 </pre>
31 <p></div><div id="source" class="tabs-container">
32 </p>
33 <pre>&lt;!DOCTYPE html&gt;
34 &lt;html&gt;
35 &lt;head&gt;
36 &lt;link type=&quot;text/css&quot; href=&quot;http://jqueryui.com/latest/themes/base/ui.all.css&quot; rel=&quot;stylesheet&quot; /&gt;
37 &lt;script type=&quot;text/javascript&quot; src=&quot;http://jqueryui.com/latest/jquery-1.3.2.js&quot;&gt;&lt;/script&gt;
38 &lt;script src=&quot;http://ui.jquery.com/latest/ui/effects.core.js&quot;&gt;&lt;/script&gt;
39 &lt;style type=&quot;text/css&quot;&gt;
40 p { cursor: pointer; font-size: 1.2em; }
41 .selected { color:red; }
42 &lt;/style&gt;
43 &lt;script type="text/javascript"&gt;
44 $(document).ready(function(){
45 $(&quot;p&quot;).<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
46 $(this).<strong class="selflink">toggleClass</strong>(&quot;selected&quot;, 1000);
47 });
48 });
49 &lt;/script&gt;
50 &lt;/head&gt;
51 &lt;body style="font-size:62.5%;"&gt;
52
53 &lt;p&gt;Click me to toggle 'selected' class.&lt;/p&gt;
54 &lt;p class=&quot;selected&quot;&gt;Click me to toggle 'selected' class.&lt;/p&gt;
55 &lt;p&gt;Click me to toggle 'selected' class.&lt;/p&gt;
56
57 &lt;/body&gt;
58 &lt;/html&gt;
59 </pre>
60 <p></div>
61 </p><p></div>
62 </div>
63 </div>
64 <div id="options">
65 <h2 class="top-header">Arguments</h2>
66 <ul class="options-list">
67
68 <li class="option" id="option-class">
69 <div class="option-header">
70 <h3 class="option-name"><a href="#option-class">class</a></h3>
71 <dl>
72 <dt class="option-type-label">Type:</dt>
73 <dd class="option-type">String</dd>
74
75 </dl>
76 </div>
77 <div class="option-description">
78 <p>A CSS class to toggle on the elements.</p>
79 </div>
80 </li>
81
82
83 <li class="option" id="option-duration">
84 <div class="option-header">
85 <h3 class="option-name"><a href="#option-duration">duration</a></h3>
86 <dl>
87 <dt class="option-type-label">Type:</dt>
88 <dd class="option-type">String, Number</dd>
89
90 <dt class="option-optional-label">Optional</dt>
91
92 </dl>
93 </div>
94 <div class="option-description">
95 <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>
96 </div>
97 </li>
98
99 </ul>
100 </div>
101 </div>
102
103 </p><!--
104 Pre-expand include size: 5128 bytes
105 Post-expand include size: 6997 bytes
106 Template argument size: 4427 bytes
107 Maximum: 2097152 bytes
108 -->
109
110 <!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2608-1!1!0!!en!2 and timestamp 20090604041528 -->
111