<?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>setAttribute &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/setattribute/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>setAttribute(&#8216;class&#8217;) and IE</title>
		<link>/2009/09/07/setattributeclass-and-ie/</link>
		<comments>/2009/09/07/setattributeclass-and-ie/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 06:09:44 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[setAttribute]]></category>

		<guid isPermaLink="false">/?p=732</guid>
		<description><![CDATA[What happens on IE, our favorite browser, when you try to setup a class attribute on a DOM element? Actually this is not possible, because setAttribute(&#8216;class&#8217;, &#8216;my-class&#8217;) is obviously working only on non-IE browsers. On IE actually you should setup the class on an element with that structure: element.setAttribute('className', 'my-class');<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/03/11/css-priority-the-difference-between-a-my-class-and-my-class/" rel="bookmark" title="CSS Priority: The Difference Between a.my-class and .my-class">CSS Priority: The Difference Between a.my-class and .my-class </a></li>
<li><a href="/2009/12/23/csstext-and-how-it-can-be-very-very-useful/" rel="bookmark" title="cssText and how it can be very very useful">cssText and how it can be very very useful </a></li>
<li><a href="/2010/07/16/friday-algorithms-a-data-structure-javascript-stack/" rel="bookmark" title="Friday Algorithms: A Data Structure: JavaScript Stack">Friday Algorithms: A Data Structure: JavaScript Stack </a></li>
<li><a href="/2009/11/04/jquery-css-selectors-change-one-or-more-css-properties/" rel="bookmark" title="jQuery CSS selectors. Change one or more CSS properties!">jQuery CSS selectors. Change one or more CSS properties! </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>What happens on IE, our favorite browser, when you try to setup a class attribute on a DOM element? Actually this is not possible, because setAttribute(&#8216;class&#8217;, &#8216;my-class&#8217;) is obviously working only on non-IE browsers.</p>
<p>On IE actually you should setup the class on an element with that structure:</p>
<blockquote>
<pre>element.setAttribute('className', 'my-class');</pre>
</blockquote>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/03/11/css-priority-the-difference-between-a-my-class-and-my-class/" rel="bookmark" title="CSS Priority: The Difference Between a.my-class and .my-class">CSS Priority: The Difference Between a.my-class and .my-class </a></li>
<li><a href="/2009/12/23/csstext-and-how-it-can-be-very-very-useful/" rel="bookmark" title="cssText and how it can be very very useful">cssText and how it can be very very useful </a></li>
<li><a href="/2010/07/16/friday-algorithms-a-data-structure-javascript-stack/" rel="bookmark" title="Friday Algorithms: A Data Structure: JavaScript Stack">Friday Algorithms: A Data Structure: JavaScript Stack </a></li>
<li><a href="/2009/11/04/jquery-css-selectors-change-one-or-more-css-properties/" rel="bookmark" title="jQuery CSS selectors. Change one or more CSS properties!">jQuery CSS selectors. Change one or more CSS properties! </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/09/07/setattributeclass-and-ie/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
