title: blur() is not triggering when I click outside the input field
body: <p>I'm trying to to create a jQuery validation, so far I have managed to addClass('has-error') to div.form-control. I'm trying to remove that class when I press TAB or click out of the input field, but my code isn't working.</p>
  
  <p>HTML code</p>
  
  <pre><code>&lt;form class="form-horizontal" onsubmit='return false;' id="useradd"&gt;
  
  &lt;input type="hidden" id="token" name="_token" value="{{csrf_token()}}"&gt;
  &lt;div class="form-group"&gt;
      &lt;label class="col-sm-2 control-label"&gt;Name&lt;/label&gt;
  
      &lt;div class="col-sm-8"&gt;
          &lt;input type="text" class="form-control" value="" name="username" id="username" required&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="hr-line-dashed"&gt;&lt;/div&gt;
  &lt;div class="form-group" id="useremail-div"&gt;
      &lt;label class="col-sm-2 control-label" id="email-label"&gt;Email&lt;/label&gt;
      &lt;div class="col-sm-8"&gt;
          &lt;input type="text" class="form-control" value="" name="useremail" id="useremail"&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="hr-line-dashed"&gt;&lt;/div&gt;
  &lt;div class="form-group"&gt;
      &lt;label class="col-sm-2 control-label"&gt;Password&lt;/label&gt;
  
      &lt;div class="col-sm-8"&gt;
          &lt;input type="password" class="form-control" value="" name="password" id="password" required&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS code</p>
  
  <pre><code> if ($("#username").val() == "" || $("#username").val().length &lt; 3) {
              $("#username").addClass('error');
              return false;
          } else {
              name = $("#username").val();
              $("#username").removeClass('error');
          }
          if ($("#useremail").val() == "" || $("#useremail").val().length &lt; 3 || !emailpatt.test($("#useremail").val())) {
              $("#useremail-div").addClass('has-error');
              $('#email-label').text('Incorrect Email Address');
              return false;
          } else {
  
              $("#useremail").blur(function() {
                  console.log('out');
              });
  
  
          }
  </code></pre>
  
  <p>I've tried focusout() and focusleave(), nothing worked.</p>