| 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 removeClass</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/removeClass?section=1" title="Edit section: removeClass( [class], [duration] )">edit</a>]</div><a name="removeClass.28_.5Bclass.5D.2C_.5Bduration.5D_.29"></a><h3>removeClass( <span class="optional">[</span>class<span class="optional">]</span>, <span class="optional">[</span>duration<span class="optional">]</span> )</h3> |
| 12 |
<p>Removes all or specified class from each of the set of matched elements with an optional transition between the states.</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 |
Removes the class 'selected' from the matched elements with a one second transition.<br /> |
| 26 |
</p> |
| 27 |
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () { |
| 28 |
$(this).<strong class="selflink">removeClass</strong>("selected", 1000); |
| 29 |
}); |
| 30 |
</pre> |
| 31 |
<p></div><div id="source" class="tabs-container"> |
| 32 |
</p> |
| 33 |
<pre><!DOCTYPE html> |
| 34 |
<html> |
| 35 |
<head> |
| 36 |
<link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" /> |
| 37 |
<script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script> |
| 38 |
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script> |
| 39 |
<style type="text/css"> |
| 40 |
p { cursor: pointer; font-size: 1.2em; } |
| 41 |
.selected { color:red; } |
| 42 |
</style> |
| 43 |
<script type="text/javascript"> |
| 44 |
$(document).ready(function(){ |
| 45 |
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () { |
| 46 |
$(this).<strong class="selflink">removeClass</strong>("selected", 1000); |
| 47 |
}); |
| 48 |
}); |
| 49 |
</script> |
| 50 |
</head> |
| 51 |
<body style="font-size:62.5%;"> |
| 52 |
|
| 53 |
<p class="selected">Click me to remove 'selected' class.</p> |
| 54 |
<p class="selected">Click me to remove 'selected' class.</p> |
| 55 |
<p class="selected">Click me to remove 'selected' class.</p> |
| 56 |
|
| 57 |
</body> |
| 58 |
</html> |
| 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 |
<dt class="option-optional-label">Optional</dt> |
| 76 |
|
| 77 |
</dl> |
| 78 |
</div> |
| 79 |
<div class="option-description"> |
| 80 |
<p>CSS classes to remove from the elements.</p> |
| 81 |
</div> |
| 82 |
</li> |
| 83 |
|
| 84 |
|
| 85 |
<li class="option" id="option-duration"> |
| 86 |
<div class="option-header"> |
| 87 |
<h3 class="option-name"><a href="#option-duration">duration</a></h3> |
| 88 |
<dl> |
| 89 |
<dt class="option-type-label">Type:</dt> |
| 90 |
<dd class="option-type">String, Number</dd> |
| 91 |
|
| 92 |
<dt class="option-optional-label">Optional</dt> |
| 93 |
|
| 94 |
</dl> |
| 95 |
</div> |
| 96 |
<div class="option-description"> |
| 97 |
<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> |
| 98 |
</div> |
| 99 |
</li> |
| 100 |
|
| 101 |
</ul> |
| 102 |
</div> |
| 103 |
</div> |
| 104 |
|
| 105 |
</p><!-- |
| 106 |
Pre-expand include size: 5154 bytes |
| 107 |
Post-expand include size: 7134 bytes |
| 108 |
Template argument size: 4488 bytes |
| 109 |
Maximum: 2097152 bytes |
| 110 |
--> |
| 111 |
|
| 112 |
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2607-1!1!0!!en!2 and timestamp 20090604035742 --> |
| 113 |
|