Created
May 3, 2012 17:34
-
-
Save evanshajed/2587486 to your computer and use it in GitHub Desktop.
Bootstrap JQuery Instant Mail Check Snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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