jQuery - change table row color on hover, getting hover events to work
<p>I want to highlight a table row by changing its color, using jQuery.  Have RTFM'd, experimented and researched extensively with little luck.  </p>

<p>HTML:</p>

<pre><code>&lt;table id="waypointsTable" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;some text&lt;/td&gt;
&lt;/tr&gt; ...
</code></pre>

<p>javascript:</p>

<pre><code>$('#waypointsTable &gt; tbody &gt; tr &gt; td').hover(function() {
    alert(1);
}, function() {
    alert(2);
});
</code></pre>

<p>At this point I'm just trying to get the hover functions to fire.  Should hover be tied to the tr or the td? Do I always have to include the tbody reference when selecting table rows and td's?  Is it better to put a class on each tr or td instead of the above approach?</p>

<p>Thanks.</p>
