jQuery parent('tr') onFocus
<p>An application that I am building uses a large table with data input fields to record data. I need to give the user a visual clue as to what table row they are on to help them navigate the form.</p>

<p>Currently I have  </p>

<pre><code>onFocus="HighlightTableRow()"
</code></pre>

<p>on a dropdown list. When a user clicks or tabs to this form element, the parent table row should highlight. So, here's the function that gets called onFocus:</p>

<pre><code>function HighlightTableRow(){  
  $(this).parent("tr").addClass('RowHighlight');  
  //alert($(this));  
}
</code></pre>

<p>Two problems:</p>

<ol>
<li>When that row is not in use (form element NOT onFocus) then I need to .removeClass('RowHighlight'). Not sure how to do that.  </li>
<li>I can't seem to get the selector right. The alert that I commented out will fire, but nothing happens to the style of the 'tr' element.</li>
</ol>

<p>Any help appreciated. Thanks!</p>
