title: How can I pause jQuery until a condition is met?
body: <p>The condition is that a SPACE is typed.... It's inside a CASE statement:</p>
  
  <pre><code>        case KEY.ATSIGN:
  
                          clearTimeout(timeout);
                          //alert(event.keyCode);
                          while(event.keyCode != 32) {
                              alert(event.keyCode);
                              timeout = setTimeout(onChange, options.delayLong);
  
                          }
  
              break;
  </code></pre>
  
  <p>32 is the ascii for space... I am trying to get the subset matching feature to work in jQuery only AFTER an @ sign is typed.... Hence the case statement KEY.ATSIGN.</p>