<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Keith Rull - jQuery</title>
    <link>http://www.keithrull.com/</link>
    <description>Blog of a Filipino Developer about C#, VB.NET, ASP.NET, Java, PHP, SQL Server, MySql and Oracle</description>
    <language>en-us</language>
    <copyright>Keith Rull</copyright>
    <lastBuildDate>Wed, 09 Jun 2010 18:32:49 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>keith.rull@gmail.com</managingEditor>
    <webMaster>keith.rull@gmail.com</webMaster>
    <item>
      <trackback:ping>http://www.keithrull.com/Trackback.aspx?guid=8672fb88-1b26-41f0-b107-973ad6b9b6e8</trackback:ping>
      <pingback:server>http://www.keithrull.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.keithrull.com/PermaLink,guid,8672fb88-1b26-41f0-b107-973ad6b9b6e8.aspx</pingback:target>
      <dc:creator>Keith Rull</dc:creator>
      <wfw:comment>http://www.keithrull.com/CommentView,guid,8672fb88-1b26-41f0-b107-973ad6b9b6e8.aspx</wfw:comment>
      <wfw:commentRss>http://www.keithrull.com/SyndicationService.asmx/GetEntryCommentsRss?guid=8672fb88-1b26-41f0-b107-973ad6b9b6e8</wfw:commentRss>
      <title>How To: Change table cell color depending on its value using jQuery</title>
      <guid isPermaLink="false">http://www.keithrull.com/PermaLink,guid,8672fb88-1b26-41f0-b107-973ad6b9b6e8.aspx</guid>
      <link>http://www.keithrull.com/2010/06/09/HowToChangeTableCellColorDependingOnItsValueUsingJQuery.aspx</link>
      <pubDate>Wed, 09 Jun 2010 18:32:49 GMT</pubDate>
      <description>Here's a nifty trick using jQuery on how to iterate on all rows of a table except the first row,
 how to get the value of a column in the current row being iterated and how to change the table cell color depending on the value it contains. &lt;br&gt;
&lt;br&gt;
In this case we wanted to change the color of the 3rd column depending on whether
it is higher or lower than the second column. There are two examples in here. The
first one is select the table via its ID and the second version is selecting the table
based on its class name.&lt;br&gt;
&lt;br&gt;
&lt;pre style="font-size: 11px; font-family: Courier New;"&gt;&lt;span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt; &amp;lt;script
src=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&lt;/span&gt; type=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br&gt;
&amp;lt;script type=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"text/javascript"&lt;/span&gt;&amp;gt; 
&lt;br&gt;
$(document).ready(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;function&lt;/span&gt;()&lt;br&gt;
{ 
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//iterate
through all the rows in our table called yourtable&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//excluding
the first row because those are column titles&lt;/span&gt;
&lt;br&gt;
$(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#yourtablename
tr:not(:first)"&lt;/span&gt;).each(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;function&lt;/span&gt;()
{ 
&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//get
the value of the table cell located&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//in
the third column of the current row&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;var&lt;/span&gt; priceYesterday &lt;span style="color: Red; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; $(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(2)"&lt;/span&gt;).html();&lt;br&gt;
&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;var&lt;/span&gt; priceToday &lt;span style="color: Red; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; $(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(3)"&lt;/span&gt;).html();&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//check
if its greater than zero&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;if&lt;/span&gt; (priceToday
&amp;gt; priceYesterday){&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//change
the color of the text to green if its a positive number&lt;/span&gt;
&lt;br&gt;
$(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(3)"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#00FF00"&lt;/span&gt;);&lt;br&gt;
}&lt;br&gt;
&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;else&lt;/span&gt; &lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;if&lt;/span&gt;(priceToday
&amp;lt; priceYesterday){&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//change
the color of the text to red if its a negatice number&lt;/span&gt;
&lt;br&gt;
$(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(3)"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FF0000"&lt;/span&gt;);&lt;br&gt;
}&lt;br&gt;
});&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//iterate
through all the rows in our table called yourtable&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//excluding
the first row because those are column titles&lt;/span&gt;
&lt;br&gt;
$(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".yourtableclassname
tr:not(:first)"&lt;/span&gt;).each(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;function&lt;/span&gt;()
{ 
&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//get
the value of the table cell located&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//in
the third column of the current row&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;var&lt;/span&gt; priceYesterday &lt;span style="color: Red; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; $(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(2)"&lt;/span&gt;).html();&lt;br&gt;
&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;var&lt;/span&gt; priceToday &lt;span style="color: Red; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; $(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(3)"&lt;/span&gt;).html();&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//check
if its greater than zero&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;if&lt;/span&gt; (priceToday
&amp;gt; priceYesterday){&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//change
the color of the text to green if its a positive number&lt;/span&gt;
&lt;br&gt;
$(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(3)"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#00FF00"&lt;/span&gt;);&lt;br&gt;
}&lt;br&gt;
&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;else&lt;/span&gt; &lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;if&lt;/span&gt;(priceToday
&amp;lt; priceYesterday){&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//change
the color of the text to red if its a negatice number&lt;/span&gt;
&lt;br&gt;
$(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(3)"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FF0000"&lt;/span&gt;);&lt;br&gt;
}&lt;br&gt;
});&lt;br&gt;
&lt;br&gt;
});&lt;br&gt;
&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;/pre&gt;Below is the full source for this sample:&lt;br&gt;
&lt;br&gt;
&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt; 
			$(document).ready(function()
			{	
				//iterate through all the rows in our table called yourtable
				//excluding the first row because those are column titles
				$("#yourtablename tr:not(:first)").each(function() { 
					
					//get the value of the table cell located
					//in the third column of the current row
					var priceYesterday = $(this).find("td:nth-child(2)").html();
					var priceToday = $(this).find("td:nth-child(3)").html();
					
					//check if its greater than zero
					if (priceToday &gt; priceYesterday){
						//change the color of the text to green if its a positive number
						$(this).find("td:nth-child(3)").css("color", "#00FF00");
					}
					else if(priceToday &lt; priceYesterday){
						//change the color of the text to red if its a negatice number
						$(this).find("td:nth-child(3)").css("color", "#FF0000");
					}
				});
				
				//iterate through all the rows in our table called yourtable
				//excluding the first row because those are column titles
				$(".yourtableclassname tr:not(:first)").each(function() { 
					
					//get the value of the table cell located
					//in the third column of the current row
					var priceYesterday = $(this).find("td:nth-child(2)").html();
					var priceToday = $(this).find("td:nth-child(3)").html();
					
					//check if its greater than zero
					if (priceToday &gt; priceYesterday){
						//change the color of the text to green if its a positive number
						$(this).find("td:nth-child(3)").css("color", "#00FF00");
					}
					else if(priceToday &lt; priceYesterday){
						//change the color of the text to red if its a negatice number
						$(this).find("td:nth-child(3)").css("color", "#FF0000");
					}
				});

			});
		&lt;/script&gt;
&lt;h3&gt;Iterating to the table via table id
&lt;/h3&gt;
&lt;table id="yourtablename"&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;td&gt;
Product Name&lt;/td&gt;
&lt;td&gt;
Yesterday&lt;/td&gt;
&lt;td&gt;
Today&lt;/td&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr sizcache="2"&gt;
&lt;td nodeindex="1"&gt;
Egg&lt;/td&gt;
&lt;td nodeindex="2"&gt;
1.95&lt;/td&gt;
&lt;td style="color: rgb(0, 255, 0);" nodeindex="3"&gt;
2.10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr sizcache="5"&gt;
&lt;td nodeindex="1"&gt;
Sugar&lt;/td&gt;
&lt;td nodeindex="2"&gt;
1.92&lt;/td&gt;
&lt;td style="color: rgb(255, 0, 0);" nodeindex="3"&gt;
1.88&lt;/td&gt;
&lt;/tr&gt;
&lt;tr sizcache="8"&gt;
&lt;td nodeindex="1"&gt;
Milk&lt;/td&gt;
&lt;td nodeindex="2"&gt;
1.95&lt;/td&gt;
&lt;td style="color: rgb(0, 255, 0);" nodeindex="3"&gt;
1.97&lt;/td&gt;
&lt;/tr&gt;
&lt;tr sizcache="11"&gt;
&lt;td nodeindex="1"&gt;
beans&lt;/td&gt;
&lt;td nodeindex="2"&gt;
3.15&lt;/td&gt;
&lt;td style="color: rgb(255, 0, 0);" nodeindex="3"&gt;
3.06&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Iterating to the table via class name
&lt;/h3&gt;
&lt;table class="yourtableclassname"&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;td&gt;
Product Name&lt;/td&gt;
&lt;td&gt;
Yesterday&lt;/td&gt;
&lt;td&gt;
Today&lt;/td&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr sizcache="14"&gt;
&lt;td nodeindex="1"&gt;
Egg&lt;/td&gt;
&lt;td nodeindex="2"&gt;
1.95&lt;/td&gt;
&lt;td style="color: rgb(0, 255, 0);" nodeindex="3"&gt;
2.10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr sizcache="17"&gt;
&lt;td nodeindex="1"&gt;
Sugar&lt;/td&gt;
&lt;td nodeindex="2"&gt;
1.92&lt;/td&gt;
&lt;td style="color: rgb(255, 0, 0);" nodeindex="3"&gt;
1.88&lt;/td&gt;
&lt;/tr&gt;
&lt;tr sizcache="20"&gt;
&lt;td nodeindex="1"&gt;
Milk&lt;/td&gt;
&lt;td nodeindex="2"&gt;
1.95&lt;/td&gt;
&lt;td style="color: rgb(0, 255, 0);" nodeindex="3"&gt;
1.97&lt;/td&gt;
&lt;/tr&gt;
&lt;tr sizcache="23"&gt;
&lt;td nodeindex="1"&gt;
beans&lt;/td&gt;
&lt;td nodeindex="2"&gt;
3.15&lt;/td&gt;
&lt;td style="color: rgb(255, 0, 0);" nodeindex="3"&gt;
3.06&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;br&gt;
&lt;pre style="font-size: 11px; font-family: Courier New;"&gt;&lt;font color="#ff0000"&gt;&lt;span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;&amp;lt;html&amp;gt;&lt;br&gt;
&amp;lt;head&amp;gt;&lt;br&gt;
&amp;lt;script src=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&lt;/span&gt; type=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br&gt;
&amp;lt;script type=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"text/javascript"&lt;/span&gt;&amp;gt; 
&lt;br&gt;
$(document).ready(function()&lt;br&gt;
{ 
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//iterate
through all the rows in our table called yourtable&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//excluding
the first row because those are column titles&lt;/span&gt;
&lt;br&gt;
$(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#yourtablename
tr:not(:first)"&lt;/span&gt;).each(function() { 
&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//get
the value of the table cell located&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//in
the third column of the current row&lt;/span&gt;
&lt;br&gt;
var priceYesterday &lt;span style="color: Red; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; $(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(2)"&lt;/span&gt;).html();&lt;br&gt;
var priceToday &lt;span style="color: Red; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; $(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(3)"&lt;/span&gt;).html();&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//check
if its greater than zero&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;if&lt;/span&gt; (priceToday
&amp;gt; priceYesterday){&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//change
the color of the text to green if its a positive number&lt;/span&gt;
&lt;br&gt;
$(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(3)"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#00FF00"&lt;/span&gt;);&lt;br&gt;
}&lt;br&gt;
&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;else&lt;/span&gt; &lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;if&lt;/span&gt;(priceToday
&amp;lt; priceYesterday){&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//change
the color of the text to red if its a negatice number&lt;/span&gt;
&lt;br&gt;
$(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(3)"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FF0000"&lt;/span&gt;);&lt;br&gt;
}&lt;br&gt;
});&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//iterate
through all the rows in our table called yourtable&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//excluding
the first row because those are column titles&lt;/span&gt;
&lt;br&gt;
$(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".yourtableclassname
tr:not(:first)"&lt;/span&gt;).each(function() { 
&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//get
the value of the table cell located&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//in
the third column of the current row&lt;/span&gt;
&lt;br&gt;
var priceYesterday &lt;span style="color: Red; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; $(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(2)"&lt;/span&gt;).html();&lt;br&gt;
var priceToday &lt;span style="color: Red; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; $(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(3)"&lt;/span&gt;).html();&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//check
if its greater than zero&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;if&lt;/span&gt; (priceToday
&amp;gt; priceYesterday){&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//change
the color of the text to green if its a positive number&lt;/span&gt;
&lt;br&gt;
$(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(3)"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#00FF00"&lt;/span&gt;);&lt;br&gt;
}&lt;br&gt;
&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;else&lt;/span&gt; &lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;if&lt;/span&gt;(priceToday
&amp;lt; priceYesterday){&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//change
the color of the text to red if its a negatice number&lt;/span&gt;
&lt;br&gt;
$(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;this&lt;/span&gt;).find(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"td:nth-child(3)"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FF0000"&lt;/span&gt;);&lt;br&gt;
}&lt;br&gt;
});&lt;br&gt;
&lt;br&gt;
});&lt;br&gt;
&amp;lt;/script&amp;gt;&lt;br&gt;
&amp;lt;/head&amp;gt;&lt;br&gt;
&amp;lt;body&amp;gt;&lt;br&gt;
&amp;lt;h3&amp;gt;Iterating to the table via table id&amp;lt;/h3&amp;gt;&lt;br&gt;
&amp;lt;table id=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"yourtablename"&lt;/span&gt;&amp;gt;&lt;br&gt;
&amp;lt;thead&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;Product Name&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;Yesterday&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;Today&amp;lt;/td&amp;gt; 
&lt;br&gt;
&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;/thead&amp;gt;&lt;br&gt;
&amp;lt;tbody&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;Egg&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;1.95&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;2.10&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;Sugar&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;1.92&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;1.88&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;/tr&amp;gt; 
&lt;br&gt;
&amp;lt;tr&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;Milk&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;1.95&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;1.97&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;beans&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;3.15&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;3.06&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;/tr&amp;gt; 
&lt;br&gt;
&amp;lt;/tbody&amp;gt;&lt;br&gt;
&amp;lt;/table&amp;gt;&lt;br&gt;
&lt;br&gt;
&amp;lt;h3&amp;gt;Iterating to the table via &lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;class&lt;/span&gt; name&amp;lt;/h3&amp;gt;&lt;br&gt;
&amp;lt;table &lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;class&lt;/span&gt;=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"yourtableclassname"&lt;/span&gt;&amp;gt;&lt;br&gt;
&amp;lt;thead&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;Product Name&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;Yesterday&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;Today&amp;lt;/td&amp;gt; 
&lt;br&gt;
&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;/thead&amp;gt;&lt;br&gt;
&amp;lt;tbody&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;Egg&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;1.95&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;2.10&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;Sugar&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;1.92&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;1.88&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;/tr&amp;gt; 
&lt;br&gt;
&amp;lt;tr&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;Milk&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;1.95&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;1.97&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;/tr&amp;gt;&lt;br&gt;
&amp;lt;tr&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;beans&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;3.15&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;td&amp;gt;3.06&amp;lt;/td&amp;gt;&lt;br&gt;
&amp;lt;/tr&amp;gt; 
&lt;br&gt;
&amp;lt;/tbody&amp;gt;&lt;br&gt;
&amp;lt;/table&amp;gt;&lt;br&gt;
&amp;lt;/body&amp;gt;&lt;br&gt;
&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/pre&gt;You can copy and paste the code above and put it on a new file to see
it running or you can view this sample running here: &lt;a href="http://www.keithrull.com/content/binary/jquery_change_table_cell_color_depending_on_value.html"&gt;jquery_change_table_cell_color_depending_on_value.html
(3.05 KB)&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
HTH&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.keithrull.com/aggbug.ashx?id=8672fb88-1b26-41f0-b107-973ad6b9b6e8" /&gt;</description>
      <comments>http://www.keithrull.com/CommentView,guid,8672fb88-1b26-41f0-b107-973ad6b9b6e8.aspx</comments>
      <category>Fun Stuff</category>
      <category>jQuery</category>
    </item>
    <item>
      <trackback:ping>http://www.keithrull.com/Trackback.aspx?guid=7b24f16a-7001-4434-a330-17245c7e15af</trackback:ping>
      <pingback:server>http://www.keithrull.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.keithrull.com/PermaLink,guid,7b24f16a-7001-4434-a330-17245c7e15af.aspx</pingback:target>
      <dc:creator>Keith Rull</dc:creator>
      <wfw:comment>http://www.keithrull.com/CommentView,guid,7b24f16a-7001-4434-a330-17245c7e15af.aspx</wfw:comment>
      <wfw:commentRss>http://www.keithrull.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7b24f16a-7001-4434-a330-17245c7e15af</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
Here's a quick and easy way to alternate the row colors of a table using jQuery<br /><br /><pre><span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px;">&lt;script&gt;<br />
$(document).ready(<span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;">function</span>()<br />
{<br /><span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;">//set
the color of the row based on rowindex</span> $(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">".report-table-horizontal
tr:even"</span>).css(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"background-color"</span>, <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"#FFF8DC"</span>);<br />
$(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">".report-table-horizontal
tr:odd"</span>).css(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"background-color"</span>, <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"#FFFBD0"</span>);<br /><br /><span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;">//highlight
the table titles by selecting the first row</span> $(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">".report-table-horizontal
tr:first"</span>).css(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"background-color"</span>, <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"#FFCC33"</span>);<br /><br />
});<br />
&lt;/script&gt;</span></pre>The resulting code will apply the to the table and would
look like this:<br /><br /><img src="http://www.keithrull.com/content/binary/changingtablerowcolorsinjquery.JPG" border="0" /><br /><br />
Basically what the code is doing is that it is selecting a css class called "report-table-horizontal"
and applies the style to the tr attribute of the table based on their row index whether
they are even or odd.<br /><br />
Now if you want to change the color of a  table column you can do so using this
script:<br /><pre><span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px;">&lt;script&gt;
$(document).ready(<span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;">function</span>()
{ <span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;">//set
the color of the row based on rowindex</span> $(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">".report-table-vertical
tr:even"</span>).css(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"background-color"</span>, <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"#FFF8DC"</span>);
$(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">".report-table-vertical
tr:odd"</span>).css(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"background-color"</span>, <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"#FFFBD0"</span>); <span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;">//set
the color of the first column</span> $(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">".report-table-vertical
td:first-child"</span>).css(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"background-color"</span>, <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"#FFCC33"</span>);
}); &lt;/script&gt;</span></pre><br /><img src="http://www.keithrull.com/content/binary/changingtablecolumncolorsinjquery.JPG" border="0" /><br /><br />
The difference on this code is the third line wherein we specified that the style
will be applied on the first td element of the table. Alternately you can use the
nth-child(n) selector instead to do the same task:<br /><br /><pre><span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px;">$(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">".report-table-vertical
td:nth-child(1)"</span>).css(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"background-color"</span>, <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"#FFCC33"</span>);</span></pre><br />
Hope this helps. You can view the live sample here: 
<br /><a href="http://www.keithrull.com/content/binary/alternating%20table%20colors%20with%20jquery.html">alternating
table colors with jquery.html (2.42 KB)</a><br /><br />
or just copy and paste the HTML code below to a new file:<br /><pre><span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px;">&lt;html&gt;
&lt;head&gt; &lt;title&gt;Working <span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;">with</span> tables <span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;">in</span> jQuery&lt;/title&gt;
&lt;script src=<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"</span> type=<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"text/javascript"</span>&gt;&lt;/script&gt;
&lt;script&gt; $(document).ready(<span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;">function</span>()
{ <span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;">//set
the color of the row based on rowindex</span> $(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">".report-table-horizontal
tr:even"</span>).css(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"background-color"</span>, <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"#FFF8DC"</span>);
$(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">".report-table-horizontal
tr:odd"</span>).css(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"background-color"</span>, <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"#FFFBD0"</span>); <span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;">//highlight
the table titles by selecting the first row</span> $(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">".report-table-horizontal
tr:first"</span>).css(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"background-color"</span>, <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"#FFCC33"</span>); <span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;">//set
the color of the row based on rowindex</span> $(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">".report-table-vertical
tr:even"</span>).css(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"background-color"</span>, <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"#FFF8DC"</span>);
$(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">".report-table-vertical
tr:odd"</span>).css(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"background-color"</span>, <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"#FFFBD0"</span>); <span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;">//set
the color of the first column</span> $(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">".report-table-vertical
td:nth-child(1)"</span>).css(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"background-color"</span>, <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"#FFCC33"</span>);
}); &lt;/script&gt; &lt;style type=<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"text/css"</span>&gt;
body { font-family: Arial; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;h2&gt;Alternating
row colors <span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;">in</span> a
table <span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;">with</span> jquery&lt;/h2&gt;
&lt;table class=<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"report-table-horizontal"</span>&gt;
&lt;tr&gt; &lt;td width=<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"100px"</span>&gt;Firstname&lt;/td&gt;
&lt;td width=<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"100px"</span>&gt;Lastname&lt;/td&gt;
&lt;td&gt;Email&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Keith&lt;/td&gt; &lt;td&gt;Rull&lt;/td&gt;
&lt;td&gt;keith@example.com&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Charissa&lt;/td&gt;
&lt;td&gt;Rull&lt;/td&gt; &lt;td&gt;charissa@example.com&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;
&lt;td&gt;Zoe Adrielle&lt;/td&gt; &lt;td&gt;Rull&lt;/td&gt; &lt;td&gt;zoe@example.com&lt;/td&gt;
&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;John&lt;/td&gt; &lt;td&gt;Doe&lt;/td&gt; &lt;td&gt;jdoe@example.com&lt;/td&gt;
&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Jane&lt;/td&gt; &lt;td&gt;Doe&lt;/td&gt; &lt;td&gt;janedoe@example.com&lt;/td&gt;
&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Tony&lt;/td&gt; &lt;td&gt;Brown&lt;/td&gt; &lt;td&gt;brown@example.com&lt;/td&gt;
&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lisa&lt;/td&gt; &lt;td&gt;Sally&lt;/td&gt; &lt;td&gt;sally@example.com&lt;/td&gt;
&lt;/tr&gt; &lt;/table&gt; &lt;br /&gt; &lt;h2&gt;Change the color of the the first
column <span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;">with</span> jquery&lt;/h2&gt;
&lt;table class=<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"report-table-vertical"</span>&gt;
&lt;tr&gt; &lt;td width=<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"100px"</span>&gt;Product&lt;/td&gt;
&lt;td&gt;Price&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Eggs&lt;/td&gt; &lt;td&gt;$1.10&lt;/td&gt;
&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Flour&lt;/td&gt; &lt;td&gt;$1.20&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;Carrots&lt;/td&gt; &lt;td&gt;$0.35&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;
&lt;td&gt;Cucumber&lt;/td&gt; &lt;td&gt;$0.50&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Melon&lt;/td&gt;
&lt;td&gt;$0.99&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/body&gt; &lt;html&gt;</span></pre><br /><img width="0" height="0" src="http://www.keithrull.com/aggbug.ashx?id=7b24f16a-7001-4434-a330-17245c7e15af" /></body>
      <title>How To: Change the row and column colors of a table using jQuery</title>
      <guid isPermaLink="false">http://www.keithrull.com/PermaLink,guid,7b24f16a-7001-4434-a330-17245c7e15af.aspx</guid>
      <link>http://www.keithrull.com/2010/05/06/HowToChangeTheRowAndColumnColorsOfATableUsingJQuery.aspx</link>
      <pubDate>Thu, 06 May 2010 00:23:11 GMT</pubDate>
      <description>&lt;p&gt;
&lt;/p&gt;
Here's a quick and easy way to alternate the row colors of a table using jQuery&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;&lt;span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;&amp;lt;script&amp;gt;&lt;br&gt;
$(document).ready(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;function&lt;/span&gt;()&lt;br&gt;
{&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//set
the color of the row based on rowindex&lt;/span&gt; $(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".report-table-horizontal
tr:even"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"background-color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FFF8DC"&lt;/span&gt;);&lt;br&gt;
$(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".report-table-horizontal
tr:odd"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"background-color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FFFBD0"&lt;/span&gt;);&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//highlight
the table titles by selecting the first row&lt;/span&gt; $(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".report-table-horizontal
tr:first"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"background-color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FFCC33"&lt;/span&gt;);&lt;br&gt;
&lt;br&gt;
});&lt;br&gt;
&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/pre&gt;The resulting code will apply the to the table and would
look like this:&lt;br&gt;
&lt;br&gt;
&lt;img src="http://www.keithrull.com/content/binary/changingtablerowcolorsinjquery.JPG" border="0"&gt;
&lt;br&gt;
&lt;br&gt;
Basically what the code is doing is that it is selecting a css class called "report-table-horizontal"
and applies the style to the tr attribute of the table based on their row index whether
they are even or odd.&lt;br&gt;
&lt;br&gt;
Now if you want to change the color of a&amp;nbsp; table column you can do so using this
script:&lt;br&gt;
&lt;pre&gt;&lt;span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;&amp;lt;script&amp;gt;
$(document).ready(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;function&lt;/span&gt;()
{ &lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//set
the color of the row based on rowindex&lt;/span&gt; $(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".report-table-vertical
tr:even"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"background-color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FFF8DC"&lt;/span&gt;);
$(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".report-table-vertical
tr:odd"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"background-color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FFFBD0"&lt;/span&gt;); &lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//set
the color of the first column&lt;/span&gt; $(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".report-table-vertical
td:first-child"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"background-color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FFCC33"&lt;/span&gt;);
}); &amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;br&gt;
&lt;img src="http://www.keithrull.com/content/binary/changingtablecolumncolorsinjquery.JPG" border="0"&gt;
&lt;br&gt;
&lt;br&gt;
The difference on this code is the third line wherein we specified that the style
will be applied on the first td element of the table. Alternately you can use the
nth-child(n) selector instead to do the same task:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;&lt;span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;$(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".report-table-vertical
td:nth-child(1)"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"background-color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FFCC33"&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;
&lt;br&gt;
Hope this helps. You can view the live sample here: 
&lt;br&gt;
&lt;a href="http://www.keithrull.com/content/binary/alternating%20table%20colors%20with%20jquery.html"&gt;alternating
table colors with jquery.html (2.42 KB)&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
or just copy and paste the HTML code below to a new file:&lt;br&gt;
&lt;pre&gt;&lt;span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt; &amp;lt;title&amp;gt;Working &lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;with&lt;/span&gt; tables &lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;in&lt;/span&gt; jQuery&amp;lt;/title&amp;gt;
&amp;lt;script src=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&lt;/span&gt; type=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt; $(document).ready(&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;function&lt;/span&gt;()
{ &lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//set
the color of the row based on rowindex&lt;/span&gt; $(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".report-table-horizontal
tr:even"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"background-color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FFF8DC"&lt;/span&gt;);
$(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".report-table-horizontal
tr:odd"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"background-color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FFFBD0"&lt;/span&gt;); &lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//highlight
the table titles by selecting the first row&lt;/span&gt; $(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".report-table-horizontal
tr:first"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"background-color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FFCC33"&lt;/span&gt;); &lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//set
the color of the row based on rowindex&lt;/span&gt; $(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".report-table-vertical
tr:even"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"background-color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FFF8DC"&lt;/span&gt;);
$(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".report-table-vertical
tr:odd"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"background-color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FFFBD0"&lt;/span&gt;); &lt;span style="color: Green; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;//set
the color of the first column&lt;/span&gt; $(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;".report-table-vertical
td:nth-child(1)"&lt;/span&gt;).css(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"background-color"&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"#FFCC33"&lt;/span&gt;);
}); &amp;lt;/script&amp;gt; &amp;lt;style type=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"text/css"&lt;/span&gt;&amp;gt;
body { font-family: Arial; } &amp;lt;/style&amp;gt; &amp;lt;/head&amp;gt; &amp;lt;body&amp;gt; &amp;lt;h2&amp;gt;Alternating
row colors &lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;in&lt;/span&gt; a
table &lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;with&lt;/span&gt; jquery&amp;lt;/h2&amp;gt;
&amp;lt;table class=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"report-table-horizontal"&lt;/span&gt;&amp;gt;
&amp;lt;tr&amp;gt; &amp;lt;td width=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"100px"&lt;/span&gt;&amp;gt;Firstname&amp;lt;/td&amp;gt;
&amp;lt;td width=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"100px"&lt;/span&gt;&amp;gt;Lastname&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;Email&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Keith&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;Rull&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;keith@example.com&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Charissa&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;Rull&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;charissa@example.com&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;Zoe Adrielle&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;Rull&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;zoe@example.com&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;John&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;Doe&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;jdoe@example.com&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Jane&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;Doe&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;janedoe@example.com&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Tony&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;Brown&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;brown@example.com&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Lisa&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;Sally&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;sally@example.com&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt; &amp;lt;/table&amp;gt; &amp;lt;br /&amp;gt; &amp;lt;h2&amp;gt;Change the color of the the first
column &lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px;"&gt;with&lt;/span&gt; jquery&amp;lt;/h2&amp;gt;
&amp;lt;table class=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"report-table-vertical"&lt;/span&gt;&amp;gt;
&amp;lt;tr&amp;gt; &amp;lt;td width=&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"100px"&lt;/span&gt;&amp;gt;Product&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;Price&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Eggs&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;$1.10&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Flour&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;$1.20&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Carrots&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;$0.35&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;Cucumber&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;$0.50&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Melon&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;$0.99&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;/table&amp;gt; &amp;lt;/body&amp;gt; &amp;lt;html&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;br&gt;
&lt;img width="0" height="0" src="http://www.keithrull.com/aggbug.ashx?id=7b24f16a-7001-4434-a330-17245c7e15af" /&gt;</description>
      <comments>http://www.keithrull.com/CommentView,guid,7b24f16a-7001-4434-a330-17245c7e15af.aspx</comments>
      <category>jQuery</category>
    </item>
  </channel>
</rss>