title: jQuery Table selected row
body: <p>I am developing an invoice program and I am trying to select a single row using jquery but I Couldn't exactly figure out how to select a row and extract its contents below is my code ! please advice </p>
  
  <p>NOTE :  I just added two rows but there will be more than 100 rows so i think its impossible to assign id's for each td and call it using that id </p>
  
  <pre><code> &lt;table class="ProductSearch"&gt;
        &lt;tr&gt;
          &lt;td&gt;ID&lt;/td&gt;
          &lt;td&gt;DESCRIPTION&lt;/td&gt;
          &lt;td&gt;Qty&lt;/td&gt;
          &lt;td&gt;PRICE&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
        &lt;/tr&gt;
          &lt;tr&gt;
          &lt;td&gt;P1&lt;/td&gt;
          &lt;td&gt;P1 Desc&lt;/td&gt;
          &lt;td&gt;P1 Qty&lt;/td&gt;
          &lt;td&gt;P1 Price&lt;/td&gt;
          &lt;td&gt;&lt;img src="select.jpg" alt="select" class="select" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
          &lt;tr&gt;
          &lt;td&gt;P2&lt;/td&gt;
          &lt;td&gt;P2 Desc&lt;/td&gt;
          &lt;td&gt;P2 Qty&lt;/td&gt;
          &lt;td&gt;P2 Price&lt;/td&gt;
          &lt;td&gt;&lt;img src="select.jpg" alt="select" class="select" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
  
  
  $(".select").live('click', function(event) {
      var rselect;
      rselect = $(this).parent().parent().index();
  $('.ProductSearch tr').each(function()
      {
        console.log($(this).html());
      });   
  });
  </code></pre>