Skip to content

Instantly share code, notes, and snippets.

@evanshajed
Created May 3, 2012 17:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evanshajed/2587486 to your computer and use it in GitHub Desktop.
Save evanshajed/2587486 to your computer and use it in GitHub Desktop.
Bootstrap JQuery Instant Mail Check Snippet
/* Bootstrap Alert snippet for JQuery Mail Check plugin.
Read More about JQuery Mail Check plugin: http://github.com/Kicksend/mailcheck/
Add mailcheck.js first before using this snippet....
*/
bootstrap_alert = function() {}
bootstrap_alert.warning = function(message) {
$('#alert_placeholder').html('<div class="alert alert-info fade in"><a class="close" data-dismiss="alert">×</a><strong>Are you typing '+message+'?</strong></div>')
}
$('#email').on('blur', function() {
$(this).mailcheck({
suggested: function(element, suggestion) {
bootstrap_alert.warning(suggestion.full);
},
empty: function(element) {
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment