How to select first row of a table?

How to select first row of a table?

Hi,

I am trying to select the first or last row of a table, how can I do it with Jquery?

I found this script below which deselects a row, but I need to do it the other way round, possible?

<script type="text/javascript">
 $(document).ready(function()
 {
  $("[title='DeselectRows']").click(function()
  {
   $(".highlighted").attr('class', '');
   $(".selected").attr('class', '');
   }); })
   </script>

Thanks