Jquery: on click table row, find value of contained input text?
<pre><code> &lt;table class="container"&gt;
 &lt;tr&gt;
   &lt;td&gt;&lt;input type="text" class="foo"&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
   &lt;td&gt;&lt;input type="text" class="foo"&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
   &lt;td&gt;&lt;input type="text" class="foo"&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/table&gt;


 &lt;script&gt;
 $(".container tr").click(function(){
     alert($(this).find("foo").val());
 });
 &lt;/script&gt;
</code></pre>

<p>What it's supposed to do:<br>
When I click on a table row it will find the input inside this element and alert it's value.  </p>

<p>Thank You!</p>
