How can I hide an element after blur if the element contains proper domain extension?
<p>I'm using the mailcheck jquery pluggin.  Everything is working good although I'm working on adding a nice addition that after a user moves off the field, (assuming there is an invalid domain extention) and the "hint" div is populated from jquery.    The jquery email suggestion loads fine although when the user goes back on the field, and corrects the domain extention, the suggestion still remains in the "hint" div. </p>

<p>Ideally this would somehow loop so that after each blur, including when there is text in the "hint" div, so that it would do a $hint.hide; or something similar. </p>

<pre><code>   var $email = $("#person_email");
var $hint = $("#hint_edit");
var mousedownHappened = false;

$email.on('blur',function() {
  if(mousedownHappened) {
  // cancel the blur event
    mousedownHappened = False;
  }
  else {
  // blur event is okay
    $hint.hide; // Hide the hint
    $(this).mailcheck({
      suggested: function(element, suggestion) {
          // First error - Fill in/show entire hint element
          var suggestion = "Did you mean: &lt;span class='suggestion'&gt;" +
                           "&lt;span class='address'&gt;" + "&lt;/span&gt;" +
                           "&lt;a href='#' class='domain'&gt;" + suggestion.address +
                           "@" + suggestion.domain + "&lt;/a&gt;&lt;/span&gt;?";

         $hint.html(suggestion).fadeIn(150);
      }
    });
  }
});

$("input.doneEditing, #searchTerm, a").mousedown(function() {
  mousedownHappened = true;
});

$hint.on('click', '.domain', function() {
  // On click, fill in the field with the suggestion and remove the hint
  $email.val($(".suggestion").text());
  $hint.fadeOut(200, function() {
    $(this).empty();
  });
  return false;
});
</code></pre>

<p>})</p>
