<?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 Demos &#8211; Extreme Web Designs</title>
	<atom:link href="https://theextremewebdesigns.com/blog/category/jquery-demos/feed/" rel="self" type="application/rss+xml" />
	<link>https://theextremewebdesigns.com/blog</link>
	<description>Web Design and Web Development</description>
	<lastBuildDate>Mon, 14 Jul 2014 10:14:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.5</generator>
<site xmlns="com-wordpress:feed-additions:1">156673191</site>	<item>
		<title>Remove Single Or Multiple Attributes Using jQuery Examples</title>
		<link>https://theextremewebdesigns.com/blog/remove-single-or-multiple-attributes-using-jquery-examples/</link>
					<comments>https://theextremewebdesigns.com/blog/remove-single-or-multiple-attributes-using-jquery-examples/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 14 Jul 2014 10:14:31 +0000</pubDate>
				<category><![CDATA[Demos]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery Demos]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[jquery-demos]]></category>
		<category><![CDATA[jquery-snippets]]></category>
		<category><![CDATA[jquery-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=3991</guid>

					<description><![CDATA[When working with different elements of a website, there might be times when you have come across different elements containing a single attribute or multiple attributes. These attributes can, in turn, consist of single or multiple properties. So in this article, I am going to share with you very easy way to get rid of [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>When working with different elements of a website, there might be times when you have come across different elements containing a single attribute or multiple attributes. These attributes can, in turn, consist of single or multiple properties. So in this article, I am going to share with you very easy way to get rid of either a single attribute or multiple attributes from any element of your choice using jQuery with easy to follow examples.</p>
<h2>How To Remove Single Or Multiple Attributes:</h2>
<p><div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=4021" 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>
     Let’s look at how to do this by means of examples. Assume that we have couple of div elements with attributes. We will see how to remove single &amp; multiple attributes from it.</p>
<h2>Examples:</h2>
<h3>Example 1: Remove single attribute from an element:</h3>
<p>In this example, we have a div with an attribute called “style”. This “style” attribute contains multiple properties such as “background-color” and “color”. We also have a button and when this button is clicked, we will remove the style attribute and the div will appear plain.</p>
<pre class="lang:xhtml decode:true">&lt;div id="my_div1" style="background-color: gold; color: darkgreen;"&gt;This is a div with a single "style" attribute.&lt;/div&gt;

&lt;input type="submit" name="sbt_remove_single_property" id="sbt_remove_single_property" value="Remove Style Attribute"&gt;

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

   $(document).ready(function () {

       $('#sbt_remove_single_property').on("click", function () {

           $('#my_div1').removeAttr('style');

       });

   });

&lt;/script&gt;</pre>
<h3>Example 2: Remove multiple attributes from an element:</h3>
<p>In this example, we have a div with an attribute called “style” and “class”. This “style” attribute contains multiple properties such as “background-color” and “color”. The “class” attribute contains multiple properties that affects the way this div is displayed even further. Next, we have a button and when this button is clicked, we will remove both the “style” and the “class” attributes and the div will appear plain.</p>
<pre class="lang:xhtml decode:true ">&lt;div id="my_div2" class="highlight" style="background-color: lightblue; color: purple;"&gt;This is a div with multiple attributes (style and class).&lt;/div&gt;

&lt;input type="submit" name="sbt_remove_multiple_properties" id="sbt_remove_multiple_properties" value="Remove Style and Class Attributes"&gt;

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

   $(document).ready(function () {

       $('#sbt_remove_multiple_properties').on("click", function () {

           $('#my_div2').removeAttr('style class');

       });

   });

&lt;/script&gt;</pre>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=4021" 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>
    
<h3>Conclusion:</h3>
<p>So from the above example, we can conclude that we can remove a single attribute or multiple attributes from any element. <strong>To remove multiple attributes, simply specifying the attributes separated by space will suffice</strong>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/remove-single-or-multiple-attributes-using-jquery-examples/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4021</post-id>	</item>
	</channel>
</rss>
