title: jquery + populate field in same row when checkbox is checked
body: <p>I have a requirement, that on checking a box, populates the input in that same row with a value.</p>
  
  <p>My code is:</p>
  
  <pre><code>function populatetransportprice() {
  // iterate through the "checked" checkboxes
  $("table.authors-list").find('input[type="checkbox"][name^="treated"]:checked').each(function () {
      alert(treatedtransportcostperton);
      row.find('input[name^="transportprice"]').val(treatedtransportcostperton.toFixed(2));
  });      
  </code></pre>
  
  <p>}</p>
  
  <p>The input field for each row is <code>tranpsortpriceX</code> where X is the row number.</p>
  
  <p>My HTML is:</p>
  
  <pre><code>&lt;table class="authors-list" id="ordertable"&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;input name="transportprice1" id="transportprice1" class="rounded"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;input name="transportprice2" id="transportprice2" class="rounded"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;input name="transportprice3" id="transportprice3" class="rounded"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>The alert populates for each checked box in the table however the input is not populated.
  I assume its with my <code>row.find</code>.</p>
  
  <p>any advice appreciated,
  Thanks</p>
  
  <p><strong>Update</strong></p>
  
  <p>current syntax:</p>
  
  <pre><code> function populatetransportprice() {
  $("table.authors-list").find('input[type="checkbox"][name^="treated"]:checked').each(function () {
   $(this).find('input[name^="transportprice"]').val(treatedtransportcostperton.toFixed(2));
  $(this).next('input[name^="transportprice"]').val(treatedtransportcostperton.toFixed(2));
  });    
  }
  </code></pre>