<?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-class &#8211; Extreme Web Designs</title>
	<atom:link href="https://theextremewebdesigns.com/blog/tag/jquery-class/feed/" rel="self" type="application/rss+xml" />
	<link>https://theextremewebdesigns.com/blog</link>
	<description>Web Design and Web Development</description>
	<lastBuildDate>Sat, 16 Mar 2013 06:31:09 +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 All Classes Examples</title>
		<link>https://theextremewebdesigns.com/blog/jquery-remove-all-classes-examplesdemos/</link>
					<comments>https://theextremewebdesigns.com/blog/jquery-remove-all-classes-examplesdemos/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 16 Mar 2013 06:31:09 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[jquery-class]]></category>
		<category><![CDATA[jquery-demos]]></category>
		<category><![CDATA[jquery-snippets]]></category>
		<category><![CDATA[jquery-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=3118</guid>

					<description><![CDATA[If you wish to use jQuery to remove all classes of an element on a web page, it can be done very easily. In this article, I am going to share easy way to delete the classes from different elements of a web page, such as Textbox, Textarea, Select Dropdown, Image, etc. How to use [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you wish to use <em><strong>jQuery to remove all classes</strong></em> of an element on a web page, it can be done very easily. In this article, I am going to share easy way to delete the classes from different elements of a web page, such as Textbox, Textarea, Select Dropdown, Image, etc.<span id="more-3118"></span></p>
<h2>How to use jQuery to Remove All Classes</h2>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=3118" 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 remove all of the classes applied to each of those elment, 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 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="Delete all classes 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="Delete all classes 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="Delete all classes 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="Delete all classes 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="Delete all classes from Div"&gt;</pre>
<h3>Example 1: Removing all the classes 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();

		e.preventDefault();

	});</pre>
<h3>Example 2: Removing all the classes 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();

		e.preventDefault();

	});</pre>
<h3>Example 3: Removing all the classes 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();

		e.preventDefault();

	});</pre>
<h3>Example 4: Erasing all the classes 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();

		e.preventDefault();

	});</pre>
<h3>Example 5: Deleting all the classes 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();

		e.preventDefault();

	});</pre>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=3118" 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 all classes</strong></em>? Feel free to suggest by commenting below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/jquery-remove-all-classes-examplesdemos/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3118</post-id>	</item>
		<item>
		<title>jQuery Remove Class using .removeClass() method Examples/Demos</title>
		<link>https://theextremewebdesigns.com/blog/jquery-remove-class-examplesdemos/</link>
					<comments>https://theextremewebdesigns.com/blog/jquery-remove-class-examplesdemos/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 16 Mar 2013 05:32:45 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[jquery-class]]></category>
		<category><![CDATA[jquery-demos]]></category>
		<category><![CDATA[jquery-snippets]]></category>
		<category><![CDATA[jquery-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=3114</guid>

					<description><![CDATA[Wondering how to use jQuery to remove class of an element on a web page? Then this article is for you. In this article, I am going to share easy ways of removing a single class from different elements of a web page, such as Textbox, Textarea, Select Dropdown, Image, etc. How to use jQuery [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Wondering how to use <em><strong>jQuery to remove class</strong></em> of an element on a web page? Then this article is for you. In this article, I am going to share easy ways of removing a single class from different elements of a web page, such as Textbox, Textarea, Select Dropdown, Image, etc.<span id="more-3114"></span></p>
<h2>How to use jQuery to Remove Class using the .removeClass() method</h2>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=3114" 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 remove a single class 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">&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;
}
&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"&gt;
    &lt;input type="submit" name="sbt_remove1" id="sbt_remove1" value="Remove Textbox Class"&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 Textarea Class"&gt;
    &lt;br&gt;
    &lt;textarea name="message" id="message" cols="45" rows="5" class="message"&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"&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 Select Dropdown Class"&gt;
  &lt;/p&gt;

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

  &lt;div id="my_div" class="my_div"&gt;This is MY DIV&lt;/div&gt;
  &lt;input type="submit" name="sbt_remove5" id="sbt_remove5" value="Remove Div Class"&gt;

&lt;p&gt;	
&lt;input type="button" name="sbt_reset" id="sbt_reset" value="Reset everything"&gt;
&lt;/p&gt;</pre>
<h3>Example 1: Remove Textbox Class in jQuery using Textbox ID</h3>
<pre class="lang:xhtml decode:true" title="Example 1">	$('#sbt_remove1').on("click", function(e){		

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

		e.preventDefault();

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

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

		e.preventDefault();

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

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

		e.preventDefault();

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

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

		e.preventDefault();

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

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

		e.preventDefault();

	});</pre>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=3114" 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 removeClass method</strong></em>? Feel free to suggest by commenting below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/jquery-remove-class-examplesdemos/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3114</post-id>	</item>
		<item>
		<title>jQuery Class Examples &#8211; Select Element With Single / Multiple Class</title>
		<link>https://theextremewebdesigns.com/blog/jquery-class-jquery-class-selector-select-element-with-single-multiple-class/</link>
					<comments>https://theextremewebdesigns.com/blog/jquery-class-jquery-class-selector-select-element-with-single-multiple-class/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 13 Jan 2013 01:08:29 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[jquery-class]]></category>
		<category><![CDATA[jquery-demos]]></category>
		<category><![CDATA[jquery-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=1965</guid>

					<description><![CDATA[If you are wanting to know how use jQuery to target Class attribute  of an element &#38; if want to be able to select element with Single / Multiple Class, then this article is for you. In this article, I will show you how to select an element with just a single class &#38; also select [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you are wanting to know how use <em><strong>jQuery to target Class attribute </strong></em> of an element &amp; if want to be able to select element with Single / Multiple Class, then this article is for you. In this article, I will show you how to select an element with just a single class &amp; also select an element which has multiple classes applied to it. Read on to find out more.<span id="more-1965"></span></p>
<h2>How to use access the Class attribute of an element using jQuery</h2>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=1965" 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>For the sake of the example, we are going to assume that we have few divs &amp; each of these divs have at least one or more class applied to them.</p>
<p><strong>Example: Complete HTML + jQuery source code</strong></p>
<pre class="lang:xhtml decode:true" title="Example">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Select Element With Single / Multiple Class in jQuery&lt;/title&gt;
&lt;script type="text/javascript" src="js/jquery-1.8.2.min.js"&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;div id="my_div1" class="my_class1"&gt;This is some content.&lt;/div&gt;

&lt;div id="my_div2" class="my_class1 my_class2"&gt;This is some content.&lt;/div&gt;

&lt;div id="my_div3" class="my_class3"&gt;This is some content.&lt;/div&gt;

&lt;div id="my_div4" class="my_class4 my_class3"&gt;This is some content.&lt;/div&gt;

&lt;div id="my_div5" class="my_class5 my_class1 my_class2 my_class3 myclass4"&gt;This is some content.&lt;/div&gt;

&lt;br&gt;

&lt;input type="submit" name="get1" id="get1" value="Get elements with my_class1" /&gt;&lt;br&gt;

&lt;input type="submit" name="get2" id="get2" value="Get elements with my_class1 &amp;amp; my_class2" /&gt;&lt;br&gt;

&lt;input type="submit" name="get3" id="get3" value="Get elements with my_class3" /&gt;&lt;br&gt;

&lt;input type="submit" name="get4" id="get4" value="Get elements with my_class3 &amp;amp; my_class4" /&gt;&lt;br&gt;

&lt;input type="submit" name="get5" id="get5" value="Get elements with my_class5" /&gt;

&lt;script type="text/javascript"&gt;

$('#get1').click(function() {

	alert( $(".my_class1").attr('id') );

});

$('#get2').click(function() {

	$(".my_class1.my_class2").each( function() {
			alert( $(this).attr("id") );
	})

});

$('#get3').click(function() {

	$(".my_class3").each( function() {
			alert( $(this).attr("id") );
	})

});

$('#get4').click(function() {

	$(".my_class3.my_class4").each( function() {
			alert( $(this).attr("id") );
	})

});

$('#get5').click(function() {

	$(".my_class5").each( function() {
			alert( $(this).attr("id") );
	})

});

&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;</pre>
<h2>Select Element With Single / Multiple Class</h2>
<p>In order to be able to show all elements with the corresponding class applied to it, it&#8217;s essential that we do it in a loop. Hence this looping is done by using the iterator function &#8220;each&#8221;. If &#8220;each&#8221; is not used, then only the first div that has the class applied will be shown &amp; the following div will be ignored, even if it has the class applied to it.</p>
<p>So that&#8217;s how you use jQuery Class Selector to select element with <strong>single or multiple classes</strong> applied to it.</p>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=1965" 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>Simple, isn&#8217;t it?</h4>
<p>Do you know of any other ways to use <em><strong>access </strong><strong>class of an element using jQuery</strong></em>? Feel free to suggest by commenting below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/jquery-class-jquery-class-selector-select-element-with-single-multiple-class/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1965</post-id>	</item>
		<item>
		<title>jQuery Get Class Examples</title>
		<link>https://theextremewebdesigns.com/blog/jquery-get-class-get-all-class-applied-element-using-jquery/</link>
					<comments>https://theextremewebdesigns.com/blog/jquery-get-class-get-all-class-applied-element-using-jquery/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 20 Jun 2012 04:51:16 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[jquery-class]]></category>
		<category><![CDATA[jquery-demos]]></category>
		<category><![CDATA[jquery-get-class]]></category>
		<category><![CDATA[jquery-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=948</guid>

					<description><![CDATA[Have you wanted to get class of an element or list of all class applied to an element using jQuery? In this article, I am going to share an easy way to do just that. Actual code is just 1 line, so it&#8217;s super easy to follow along. Examples on using jQuery to Get Class [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Have you wanted to <em><strong>get class of an element or list of all class applied to an element using jQuery</strong></em>? In this article, I am going to share an easy way to do just that. Actual code is just 1 line, so it&#8217;s super easy to follow along.<span id="more-948"></span></p>
<h2>Examples on using jQuery to Get Class</h2>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=948" 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>The following example assumes that there is a div with ID &#8220;my_div&#8221; and a list of all class applied to this div should be alerted, when &#8220;Get class&#8221; button is clicked.</p>
<h3>Example: Using jQuery to get div class</h3>
<pre class="lang:xhtml decode:true crayon-selected">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;jQuery Get Class | Get All Class applied to an element using jQuery&lt;/title&gt;
&lt;script type="text/javascript" src="js/jquery-1.8.2.min.js"&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;div id="my_div" class="Lorem ipsum dolor_spec sit amet"&gt;Hello World!&lt;/div&gt;

&lt;input type="submit" name="get" id="get" value="Get Class" /&gt;

&lt;script type="text/javascript"&gt;

$('#get').click(function() {

	alert( $("#my_div").attr("class") );

});

&lt;/script&gt; 
&lt;/body&gt;
&lt;/html&gt;</pre>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=948" 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>
    
<h5>Simple, isn&#8217;t it?</h5>
<p>Do you know of any other ways to <em><strong>get class  or get all class list applied to an element using jQuery</strong></em>? Feel free to suggest by commenting below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/jquery-get-class-get-all-class-applied-element-using-jquery/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">948</post-id>	</item>
	</channel>
</rss>
