title: Saving an input value into a variable as you type, or as soon as the input loses focus
body: <p>I've been working on this issue for a while now, and every solution I've come up with "almost works."  Ideally, I want to save the input value into the variable as I'm typing, so I don't have to perform any commands before the input value is saved into the variable.  Since I couldn't quite find the solution for that, I've been working on having it change as soon as the input loses focus.  I've tried .focusout, .change, and .blur, but none are actually changing it the moment the input loses focus.</p>
  
  <pre><code>//This will save the input value into the variable formInput
  var formInput = $("#someForm input[type=text]").val();
  
  //This successfully changes the value of formInput, but only after performing 
  //another command, such as clicking go or pressing enter.  
  //Tab does not count to the input "losing focus"
  
  $("#someForm input[type=text]").focusout(function() {
  $(this).val() = formInput.val();
  });
  
  // Same as focusout, as well as blur.
  $("#someForm input[type=text]").change(function() {
  $(this).val() = formInput.val();
  });
  
  //Nope.
  $("#someForm input[type=text]").keyup(function() {
      formInput = $("this").val();
  });
  </code></pre>