<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type='text/xsl' href='docs-1.7.xsl'?>
<entries><entry type='method' name="removeClass" return="jQuery">
                <signature>
                    <added>1.0</added>
                    <argument name="className" optional="true" type="String">
                        <desc>One or more space-separated classes to be removed from the class attribute of each matched element.</desc>
                    </argument>
                </signature>
                <signature>
                  <added>1.4</added>
                  <argument name="function(index, class)" type="Function">
                    <desc>A function returning one or more space-separated class names to be removed. Receives the index position of the element in the set and the old class value as arguments.</desc>
                  </argument>
                </signature>

                <desc>Remove a single class, multiple classes, or all classes from each element in the set of matched elements.</desc>
                <longdesc><p>If a class name is included as a parameter, then only that class will be removed from the set of matched elements. If no class names are specified in the parameter, all classes will be removed.</p>
				<p>More than one class may be removed at a time, separated by a space, from the set of matched elements, like so:</p>
				<pre>$('p').removeClass('myClass yourClass')
</pre>
				<p>This method is often used with <code>.addClass()</code> to switch elements' classes from one to another, like so:</p>
				<pre>$('p').removeClass('myClass noClass').addClass('yourClass');
</pre>
				<p>Here, the <code>myClass</code> and <code>noClass</code> classes are removed from all paragraphs, while <code>yourClass</code> is added.</p>
				<p>To replace all existing classes with another class, we can use <code>.attr('class', 'newClass')</code> instead.</p>
        <p>As of jQuery 1.4, the <code>.removeClass()</code> method allows us to indicate the class to be removed by passing in a function.</p>
        <pre>$('li:last').removeClass(function() {
          return $(this).prev().attr('class');
        });</pre>
        <p>This example removes the class name of the penultimate <code>&lt;li&gt;</code> from the last <code>&lt;li&gt;</code>.</p>
</longdesc>
                <example>
                    <desc>Remove the class 'blue' from the matched elements.</desc>
                    <code><![CDATA[$("p:even").removeClass("blue");]]></code>
                    <css><![CDATA[

  p { margin: 4px; font-size:16px; font-weight:bolder; }
  .blue { color:blue; }
  .under { text-decoration:underline; }
  .highlight { background:yellow; }
  ]]></css>
                    <html><![CDATA[<p class="blue under">Hello</p>
  <p class="blue under highlight">and</p>
  <p class="blue under">then</p>

  <p class="blue under">Goodbye</p>]]></html>
                </example>
                <example>
                    <desc>Remove the class 'blue' and 'under' from the matched elements.</desc>
                    <code><![CDATA[$("p:odd").removeClass("blue under");]]></code>
                    <css><![CDATA[
  p { margin: 4px; font-size:16px; font-weight:bolder; }
  .blue { color:blue; }
  .under { text-decoration:underline; }
  .highlight { background:yellow; }
  ]]></css>
                    <html><![CDATA[<p class="blue under">Hello</p>

  <p class="blue under highlight">and</p>
  <p class="blue under">then</p>
  <p class="blue under">Goodbye</p>]]></html>
                </example>
                <example>
                    <desc>Remove all the classes from the matched elements.</desc>
                    <code><![CDATA[$("p:eq(1)").removeClass();]]></code>
                    <css><![CDATA[

  p { margin: 4px; font-size:16px; font-weight:bolder; }
  .blue { color:blue; }
  .under { text-decoration:underline; }
  .highlight { background:yellow; }
  ]]></css>
                    <html><![CDATA[<p class="blue under">Hello</p>
  <p class="blue under highlight">and</p>
  <p class="blue under">then</p>

  <p class="blue under">Goodbye</p>]]></html>
                </example>
            <category name="Attributes"/>
<category name="Class Attribute"/>
<category name="CSS"/>
<category name="Version 1.0"/>
<category name="Version 1.4"/>
</entry></entries>