Highlighting Table Rows does not work
<p>I have a HTML table a jquery script as given in <a href="http://jsfiddle.net/Lijo/Hb28u/4/" rel="nofollow">http://jsfiddle.net/Lijo/Hb28u/4/</a>. There are four jQuery approaches for highlighting table rows. The last two approaches does not work, Why are they not working?  I am looking for an explanation in plain English.</p>

<p>HTML</p>

<pre><code>&lt;table id="table1"&gt;
&lt;tr&gt; &lt;td&gt;N&lt;/td&gt;&lt;td&gt;Y&lt;/td&gt;&lt;/tr&gt;  
&lt;tr class="y_n"&gt;&lt;td&gt;Q&lt;/td&gt;&lt;td&gt;N&lt;/td&gt;&lt;/tr&gt;  
&lt;/table&gt; 

 &lt;br/&gt;&lt;br/&gt;

&lt;table id="table2"&gt;
&lt;tr&gt; &lt;td&gt;N&lt;/td&gt;&lt;td&gt;Y&lt;/td&gt;&lt;/tr&gt;  
&lt;tr class="y_n"&gt;&lt;td&gt;Q&lt;/td&gt;&lt;td&gt;N&lt;/td&gt;&lt;/tr&gt; 
&lt;/table&gt; 

&lt;br/&gt;&lt;br/&gt;

&lt;table id="table3"&gt;
&lt;tr&gt; &lt;td&gt;N&lt;/td&gt;&lt;td&gt;Y&lt;/td&gt;&lt;/tr&gt;  
&lt;tr class="y_n"&gt;&lt;td&gt;Q&lt;/td&gt;&lt;td&gt;N&lt;/td&gt;&lt;/tr&gt;  
&lt;/table&gt; 

 &lt;br/&gt;&lt;br/&gt;

&lt;table id="table4"&gt;
&lt;tr&gt; &lt;td&gt;N&lt;/td&gt;&lt;td&gt;Y&lt;/td&gt;&lt;/tr&gt;  
&lt;tr class="y_n"&gt;&lt;td&gt;Q&lt;/td&gt;&lt;td&gt;N&lt;/td&gt;&lt;/tr&gt;  
 &lt;/table&gt; 

 &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.js"&gt;
</code></pre>

<p> </p>

<p>SCRIPT </p>

<pre><code>$(document).ready(function()
{


//Apporach 1  - Highlight First Row

$('#table1 tr td:eq(0)').each(function() {
if ($(this).text() == 'N') {
    $(this).parent().css('background-color', 'Orange');
}
});


//Apporach 2 -  - Highlight Second Row

$('#table2 tr td:gt(0)').each(function() {
if ($(this).text() == 'N') {
    $(this).parent().css('background-color', 'Orange');
}
});


//Apporach 3 - Highlight Second Row

$('#table3 tr td:eq(1)').each(function() {
if ($(this).text() == 'N') {
    $(this).parent().css('background-color', 'Orange');
}
});


//Apporach 4 Highlight All Rows

$('#table4 tr td)').each(function() {
if ($(this).text() == 'N') {
    $(this).parent().css('background-color', 'Orange');
}
});

});
</code></pre>
