<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Javascript: Dynamically Altering CSS Properties</title>
	<atom:link href="http://www.davidjrush.com/blog/2009/06/javascript-dynamically-altering-css-properties/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davidjrush.com/blog/2009/06/javascript-dynamically-altering-css-properties/</link>
	<description>A blog written about web design, CSS, and coding for beginners</description>
	<lastBuildDate>Tue, 22 Jun 2010 17:31:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: David</title>
		<link>http://www.davidjrush.com/blog/2009/06/javascript-dynamically-altering-css-properties/comment-page-1/#comment-8035</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 09 Jun 2010 23:42:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidjrush.com/blog/?p=137#comment-8035</guid>
		<description>Mark, it is hard to say what the problem is without seeing your link and the included onclick call. Send that on over and I can give you some advice. Currently, your existing code looks functional to me.</description>
		<content:encoded><![CDATA[<p>Mark, it is hard to say what the problem is without seeing your link and the included onclick call. Send that on over and I can give you some advice. Currently, your existing code looks functional to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.davidjrush.com/blog/2009/06/javascript-dynamically-altering-css-properties/comment-page-1/#comment-8034</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Wed, 09 Jun 2010 21:36:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidjrush.com/blog/?p=137#comment-8034</guid>
		<description>Thanks for publishing this piece of code - it is just what I am looking for however I cannot get it to work. My problem is that I cannot get it to pass the id=&quot;targetTag&quot; from the input line of code through the onclick  and to the Javascript function as a variable to use in function. My code is as follows - any help would be appreciated.



  
  
getElementsByTagName example  
  

function changeCSS(tagID)
{
   var currentTag = document.getElementById(tagID);
   currentTag.setAttribute(&quot;class&quot;, &quot;secondClass&quot;);
   currentTag.setAttribute(&quot;className&quot;, &quot;secondClass&quot;);
   return;
} 



.firstClass {
	background-color: #F99;
}
.secondClass {
	background-color: #F00;
}




Adjust link CSS

</description>
		<content:encoded><![CDATA[<p>Thanks for publishing this piece of code &#8211; it is just what I am looking for however I cannot get it to work. My problem is that I cannot get it to pass the id=&#8221;targetTag&#8221; from the input line of code through the onclick  and to the Javascript function as a variable to use in function. My code is as follows &#8211; any help would be appreciated.</p>
<p>getElementsByTagName example  </p>
<p>function changeCSS(tagID)<br />
{<br />
   var currentTag = document.getElementById(tagID);<br />
   currentTag.setAttribute(&#8220;class&#8221;, &#8220;secondClass&#8221;);<br />
   currentTag.setAttribute(&#8220;className&#8221;, &#8220;secondClass&#8221;);<br />
   return;<br />
} </p>
<p>.firstClass {<br />
	background-color: #F99;<br />
}<br />
.secondClass {<br />
	background-color: #F00;<br />
}</p>
<p>Adjust link CSS</p>
]]></content:encoded>
	</item>
</channel>
</rss>
