title: Associating input elements with certain buttons in a form?
body: <p><a href="http://jsfiddle.net/EGjc9/" rel="nofollow">http://jsfiddle.net/EGjc9/</a></p>
  
  <p>I have several <code>&lt;button&gt;</code> elements on a page, and I need to associate the <code>&lt;input&gt;</code> elements nearest them to those buttons. Right now, when you hit <code>ENTER</code> on any input field, it fires the first <code>&lt;button&gt;</code> in the form. How do I change this?</p>
  
  <p><strong>DOM:</strong></p>
  
  <pre><code>&lt;form action="irrelevant"&gt;
  &lt;div&gt;
  &lt;select&gt;&lt;option&gt;1&lt;/option&gt;&lt;option&gt;2&lt;/option&gt;&lt;option&gt;3&lt;/option&gt;&lt;/select&gt;
      &lt;input type='text'/&gt;
      &lt;button&gt;Hello&lt;/button&gt;
  &lt;/div&gt;
  &lt;div&gt;
      &lt;select&gt;&lt;option&gt;1&lt;/option&gt;&lt;option&gt;2&lt;/option&gt;&lt;option&gt;3&lt;/option&gt;&lt;/select&gt;
      &lt;input type='text'/&gt;
      &lt;button&gt;Hello&lt;/button&gt;
  &lt;/div&gt;
  &lt;div&gt;
      &lt;select&gt;&lt;option&gt;1&lt;/option&gt;&lt;option&gt;2&lt;/option&gt;&lt;option&gt;3&lt;/option&gt;&lt;/select&gt;
      &lt;input type='text'/&gt;
      &lt;button&gt;Hello&lt;/button&gt;
  &lt;/div&gt;
  &lt;div&gt;
      &lt;select&gt;&lt;option&gt;1&lt;/option&gt;&lt;option&gt;2&lt;/option&gt;&lt;option&gt;3&lt;/option&gt;&lt;/select&gt;
      &lt;input type='text'/&gt;
      &lt;button&gt;Hello&lt;/button&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>DOM Ready:</strong></p>
  
  <pre><code>$('button').click( function(){ 
  $(this).siblings().filter('select').val('3');
      return false;
  });
  </code></pre>