title: Show alert when focusout, only once
body: <p>I'm having a little problem with my script below. I'm trying to create a script where you can write some text in an input field, and when you have typed some text, you will get an alert when focus-out. The alert should only show, if the input contain text.</p>
  
  <p>But the problem is, that if you're trying to write some text, delete it and then focus-out of the input, the alert do not show next time, when you actually have written something and then focus-out.</p>
  
  <p>Right now, the alert function always will "disappear" when focus out, no matter if you have written any thing or not.</p>
  
  <p>I have tried to add a <code>var already_alert_me_once = true</code> before the alert, and then put everything inside an: <code>if(already_alert_me_once == false</code>), but that didn't do the trick.</p>
  
  <p>I have also tried to change <code>$('#title').focusout(function()</code> with <code>$('#title').one('focusout', function()</code> which almost did the trick.</p>
  
  <p>Here is my current script:</p>
  
  <pre><code>// When focus on title
  
  
   $('#title').focus(function () {
      // Check if empty
      if (!$(this).val()) {
          $('#title').one('focusout', function () {
              if ($(this).val()) {
                  alert("YEP");
              }
          });
      }
  });
  </code></pre>
  
  <p>..and <a href="http://jsfiddle.net/T7tFd/3/" rel="nofollow">Here's a Fiddle</a></p>
  
  <p>So my question is; How to I do so the alert only appears when you <strong>have</strong> written something, and after that never again <em>(unless you reload the page)</em>.</p>
  
  <p>Hope you can understand what I mean.</p>
  
  <p>Thanks - TheYaXxE</p>