title: Get value of textbox using jquery inside of Razor Foreach loop
body: <p>I have a div like this in my view, keep in mind this is inside of a @foreach loop in my razor view:</p>
  
  <pre><code>&lt;div class="testClass"&gt;
      &lt;input type="text" class="tempLabel" /&gt; 
                      &lt;input type="button" data-value=@(item.ID) class="testButton3" value="Test Alert" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This javascript works:</p>
  
  <pre><code>$(".testButton3").click(function () {    
       alert($(this).attr('data-value'));                
          });
  </code></pre>
  
  <p>what I want to do is get the value of the textbox inside of my tempClass class when I click the above button.  I tried this but it does not work:</p>
  
  <pre><code>$(".testButton3").click(function () {    
           alert($(".tempLabel").($(this).val()));               
              });
  </code></pre>
  
  <p>Is this possible?  Perhaps it is not possible to get the value of the textbox inside a foreach loop....</p>