How to get value of a <input> by clicking another <input> in same <tr> different <td>
<pre><code>&lt;tr class="item-row" id="itemsRow"&gt;
      &lt;td&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input class="tInput" id="invoiceNo" readonly/&gt; &lt;/td&gt;
      &lt;td&gt;&lt;input class="tInput" id="clientId" readonly /&gt; &lt;/td&gt;
      &lt;td&gt;&lt;input class="tInput" id="issueDate"  readonly/&gt;&lt;/td&gt;
      &lt;td&gt;&lt;inpu  class="tInput" id="netTotal" readonly /&gt; &lt;/td&gt;
      &lt;td&gt;&lt;input class="tInput" id="amountDue" readonly /&gt; &lt;/td&gt;
      &lt;td&gt;&lt;input class="tInput" id="status" readonly /&gt; &lt;/td&gt;
 &lt;/tr&gt;
</code></pre>

<p>Im trying to get value of 'input id=invoiceNo' when I click to 'input id=status' using following code</p>

<pre><code>var invno = $(this).closest('tr td:nth-child(2) input').val();
alert(invno);
</code></pre>

<p>It alerts 'undefined'</p>

<p>so how to solve this?</p>
