<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jquery-remove-specific-class &#8211; Extreme Web Designs</title>
	<atom:link href="https://theextremewebdesigns.com/blog/tag/jquery-remove-specific-class/feed/" rel="self" type="application/rss+xml" />
	<link>https://theextremewebdesigns.com/blog</link>
	<description>Web Design and Web Development</description>
	<lastBuildDate>Sun, 17 Mar 2013 05:45:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.8</generator>
<site xmlns="com-wordpress:feed-additions:1">156673191</site>	<item>
		<title>jQuery Remove Specific Class Examples /  Demos</title>
		<link>https://theextremewebdesigns.com/blog/jquery-remove-specific-class-examples-demos/</link>
					<comments>https://theextremewebdesigns.com/blog/jquery-remove-specific-class-examples-demos/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 17 Mar 2013 05:45:40 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[jquery-demos]]></category>
		<category><![CDATA[jquery-remove-specific-class]]></category>
		<category><![CDATA[jquery-snippets]]></category>
		<category><![CDATA[jquery-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=3126</guid>

					<description><![CDATA[If you wish to use jQuery to remove specific class of an element on a web page, we can use the .removeClass() method. In this article, I am going to share easy way to delete the specific class(es) from different elements of a web page, such as Textbox, Textarea, Select Dropdown, Image, etc. How to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you wish to use <em><strong>jQuery to remove specific class of an element</strong></em> on a web page, we can use the .removeClass() method. In this article, I am going to share easy way to delete the specific class(es) from different elements of a web page, such as Textbox, Textarea, Select Dropdown, Image, etc.</p>
<p><span id="more-3126"></span></p>
<h2>How to use jQuery to Remove Specific Class</h2>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=3126" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<p>Let&#8217;s assume that we have different html elements on a web page such as div, image, textbox, textarea, etc. We will see how to delete the specific class(es) when a button is clicked. So here we go:</p>
<p><strong>Here is the basic common HTML source code for all the following examples:</strong></p>
<pre class="lang:xhtml decode:true" title="Common HTML source code for all the following examples:">&lt;style type="text/css"&gt;
.first_name {
	background-color: #FFFF99;
	border: 1px solid #AEAE00;
}
.message {
	background-color: #9999FF;
	border: 1px solid #90F;
}
.subscribe {
	background-color: #D7FFD7;
	border: 1px solid #090;
}
.update {
	background-color: #E1F3FF;
	border: 1px solid #09F;
}
.states {
	color: #D70000;
	font-weight: bold;
}
.my_div {
	border: 10px solid #C3C;
	background-color: #C9C;
}
.image_border {
	border: 1px solid #CCC;
	padding: 5px;
}
.blue_text {
	color: #06F;	
}
.redborder {
	border: 1px solid #F00;	
}
.thick_border {
	border: 10px solid #F00;		
}
.orange_border {
	border: 10px solid #F90;
}
.img_bottom_thick_border {
	border-bottom-width: 10px;
	border-bottom-style: solid;
	border-bottom-color: #3C9;	
}
.width_and_height {
	width: 200px;
	height: 200px;
}
&lt;/style&gt;

  &lt;p&gt;
    &lt;label for="first_name"&gt;First Name&lt;/label&gt;
    &lt;input type="text" name="first_name" id="first_name" class="first_name blue_text redborder"&gt;
    &lt;input type="submit" name="sbt_remove1" id="sbt_remove1" value="Remove Red Border from Textbox"&gt;
  &lt;/p&gt;
  &lt;p&gt;
    &lt;label for="message"&gt;Message&lt;/label&gt;
    &lt;input type="submit" name="sbt_remove2" id="sbt_remove2" value="Remove Thick Border from Textarea"&gt;
    &lt;br&gt;
    &lt;textarea name="message" id="message" cols="45" rows="5" class="message thick_border"&gt;&lt;/textarea&gt;
  &lt;/p&gt;
  &lt;p&gt;
    &lt;label for="states"&gt;States&lt;/label&gt;
    &lt;select name="states" id="states" class="states orange_border"&gt;
      &lt;option value="TX" selected="selected"&gt;TX&lt;/option&gt;
      &lt;option value="AL"&gt;AL&lt;/option&gt;
      &lt;option value="CA"&gt;CA&lt;/option&gt;
    &lt;/select&gt;
    &lt;input type="submit" name="sbt_remove3" id="sbt_remove3" value="Remove Orange Border from Select Dropdown"&gt;
  &lt;/p&gt;

  &lt;p&gt;
  &lt;img src="images/money.jpg" id="image_border" class="image_border img_bottom_thick_border" /&gt;
  &lt;input type="submit" name="sbt_remove4" id="sbt_remove4" value="Remove Bottom Border from Image"&gt;  
  &lt;/p&gt;

  &lt;div id="my_div" class="my_div width_and_height"&gt;This is MY DIV&lt;/div&gt;
  &lt;input type="submit" name="sbt_remove5" id="sbt_remove5" value="Remove Width and Height from Div"&gt;</pre>
<h3>Example 1: Removing a specific class from Textbox in jQuery using Textbox ID</h3>
<pre class="lang:xhtml decode:true" title="Example 1">	$('#sbt_remove1').on("click", function(e){		

		$('#first_name').removeClass('redborder');

		e.preventDefault();

	});</pre>
<h3>Example 2: Removing a specific class from Textarea in jQuery using Textarea ID</h3>
<pre class="lang:xhtml decode:true" title="Example 2">	$('#sbt_remove2').on("click", function(e){		

		$('#message').removeClass('thick_border');

		e.preventDefault();

	});</pre>
<h3>Example 3: Removing a specific class from Select Dropdown in jQuery using Select Dropdown ID</h3>
<pre class="lang:xhtml decode:true" title="Example 3">	$('#sbt_remove3').on("click", function(e){		

		$('#states').removeClass('orange_border');

		e.preventDefault();

	});</pre>
<h3>Example 4: Erasing a specific class from Image in jQuery using Image ID</h3>
<pre class="lang:xhtml decode:true" title="Example 4">	$('#sbt_remove4').on("click", function(e){		

		$('#image_border').removeClass('img_bottom_thick_border');

		e.preventDefault();

	});</pre>
<h3>Example 5: Deleting a specific class from Div in jQuery using Div ID</h3>
<pre class="lang:xhtml decode:true" title="Example 5">	$('#sbt_remove5').on("click", function(e){		

		$('#my_div').removeClass('width_and_height');

		e.preventDefault();

	});</pre>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=3126" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<h4>That&#8217;s it!</h4>
<p>Do you know of any other ways to use <em><strong>jQuery to remove specific class</strong></em>? Feel free to suggest by commenting below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/jquery-remove-specific-class-examples-demos/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3126</post-id>	</item>
	</channel>
</rss>
