title: how to use jquery to prevent the others type?
body: <p>html structure:</p>
  
  <pre><code> 1,  &lt;input id="edit-field-14sq-und-0-value" name="field_14sq[und][0][value]" value="" size="12" maxlength="10" class="form-text" type="text"&gt;&lt;/div&gt;
  
  
  2,  &lt;input id="edit-field-15sq-und-0-value" name="field_14sq[und][0][value]" value="" size="12" maxlength="10" class="form-text" type="text"&gt;&lt;/div&gt;
  
  
  3 , &lt;input id="edit-field-16sq-und-0-value" name="field_14sq[und][0][value]" value="" size="12" maxlength="10" class="form-text" type="text"&gt;&lt;/div&gt;
  
  
  4 ,&lt;input id="edit-field-17sq-und-0-value" name="field_14sq[und][0][value]" value="" size="12" maxlength="10" class="form-text" type="text"&gt;&lt;/div&gt;
  
  
  5 ,&lt;input id="edit-field-18sq-und-0-value" name="field_14sq[und][0][value]" value="" size="12" maxlength="10" class="form-text" type="text"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>now, i want to do, if the 1, 2, 3, input box  has value, then can't type anything in 4, 5.</p>
  
  <p>if the 4, 5, input box  has value. then can't type anything in 1, 2, 3.</p>
  
  <p>the following is my test code. but it can't work.</p>
  
  <pre><code>$(document).ready(function(){
  
  $('#edit-field-14sq-und-0-value').keyup(function() {
      if ($('#edit-field-16sq-und-0-value').val().length &gt; 0) {
          alert('you can\'t type them at the same time');
          $(this).val('');
          $("#edit-field-15sq-und-0-value").val('');
      }
  })
  
  });
  </code></pre>
  
  <p>the keyup function is give an error under firebug.</p>
  
  <p>Edit: added "\" to escape single quote in alert();</p>