title: jquery find element next to another
body: <p>Hi I have the following html:</p>
  
  <pre><code>&lt;p&gt;  
      &lt;input type="text" name="field1"/&gt; &lt;input type="hidden" name="fieldh1"/&gt;  
      &lt;button type="button" class="sendInfo"&gt;Send&lt;/button&gt;  
  &lt;/p&gt;  
  &lt;p&gt;  
      &lt;input type="text" name="field2" /&gt; &lt;input type="hidden" name="fieldh2"/&gt;  
      &lt;button type="button" class="sendInfo"&gt;Send&lt;/button&gt;  
  &lt;/p&gt;  
  </code></pre>
  
  <p>What I want is that when user clicks the button, I need to send using ajax the contents of the field field.</p>
  
  <p>This is what i'm trying to do with no success.</p>
  
  <pre><code>$(function() {
          $('button.sendInfo').live('click', function() {
              var id = $(this).parent().next('[type=text]').val();
              alert(id);
          });
      });
  </code></pre>
  
  <p>I plan to set what the user types in textbox to the hidden field, and the value received from the ajax call to normal textbox. But the problem is that i can´t even get the value of the textbox that is in the same line as the button the user clicks.
  Can anyone help me?
  Thanks a lot.</p>