title: jquery get values from table from two columns at the same time to operate
body: <p>i'm struggling trying to perform the following operation:</p>
  
  <p>I've this table:</p>
  
  <pre><code>  &lt;table id="saleDetails" class="table table-hover table-condensed"&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th&gt;Code &lt;/th&gt;
          &lt;th&gt;Description &lt;/th&gt;
          &lt;th&gt;Price &lt;/th&gt;
          &lt;th&gt;Quantity &lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;th&gt; 001 &lt;/th&gt;
          &lt;th&gt; One description &lt;/th&gt;
          &lt;th&gt; 30.5 &lt;/th&gt;
          &lt;th&gt; &lt;input type="number"&gt;&lt;/input&gt; &lt;/th&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt; 002 &lt;/th&gt;
          &lt;th&gt; Some description &lt;/th&gt;
          &lt;th&gt; 120 &lt;/th&gt;
          &lt;th&gt; &lt;input type="number"&gt;&lt;/input&gt; &lt;/th&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt; 003 &lt;/th&gt;
          &lt;th&gt; Other description &lt;/th&gt;
          &lt;th&gt; 300.5 &lt;/th&gt;
          &lt;th&gt; &lt;input type="number"&gt;&lt;/input&gt; &lt;/th&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  </code></pre>
  
  <p>what i'm trying to do is get the unitPrice and multiply it by the quantity input value to get the subtotal for each line.</p>
  
  <p>i got the unitPrice with this sentence for each cell in column 3:</p>
  
  <pre><code>$('#saleDetails tr td:nth-child(3)').each(function () {
    console.log( $(this).text() );
  });
  </code></pre>
  
  <p>but i would like to perform the operation unitPrice * quantity (quantity is a input component) and i'm not sure how get the unitPrice and quantity at the same time (I'm not sure if that's possible) for each iteration on the table.</p>
  
  <p>Any help will be welcome.</p>
  
  <p>Thanks.</p>