title: Jquery find subelement from $(this)
body: <p>I have a table in in which every row contains a form. see below</p>
  
  <pre><code>&lt;table&gt;
  &lt;tr&gt;&lt;th&gt;Fee Type&lt;/th&gt;&lt;th&gt;Amount&lt;/th&gt;&lt;th&gt;% Discount&lt;/th&gt;&lt;th&gt;Discounted Amount&lt;/th&gt;&lt;th&gt;Payable to&lt;/th&gt;&lt;th&gt;Remove&lt;/th&gt;&lt;/tr&gt;    
  &lt;tr&gt;
     &lt;form&gt;
           &lt;td&gt;&lt;/td&gt;
           &lt;td class="cost"&gt;&lt;/td&gt;
           &lt;td&gt; &lt;input /&gt; &lt;/td&gt;
           &lt;td class="discount"&gt;&lt;/td&gt;
           &lt;td&gt;&lt;/td&gt;
     &lt;/form&gt;
  &lt;tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Now my intention is to have a global save button which will loop through each form and perform an ajax post. see below</p>
  
  <pre><code>    function saveEditedFees(){
          $("#savefeechanges").click(function(){
              $("#feestable form").each(function(){
                  alert( $(this).attr('id') );
              });
          });
      }
  </code></pre>
  
  <p>My problem is accessing values for the "td" using the $(this) for the elements with class <strong>"cost"</strong> and <strong>"discount"</strong>
  I tried </p>
  
  <pre><code>alert( $(this).find("td").eq(2).html() );
  alert($(this).siblings('.cost').text());
  alert($("td .cost" ,this).text());
  </code></pre>
  
  <p>Basically, I am trying to test if the value contained in the <code>&lt;td class="cost"&gt;</code> is equal to the <code>&lt;td class="discount"&gt;</code> , this way i will selectively do an ajax post.</p>
  
  <p>Please help.</p>