This commit is contained in:
quoije
2023-05-10 21:03:22 -04:00
parent ef1b411c12
commit bd732815c7
1304 changed files with 192970 additions and 5407 deletions
+38
View File
@@ -0,0 +1,38 @@
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="../src/mailcheck.js"></script>
<title>Mailcheck</title>
</head>
<body>
<h1>Mailcheck</h1>
<p>For a demo, enter [email protected] or [email protected] in the field below:</p>
<input id="email" name="email" type="email" />
<input name="Submit" type="submit" />
<p id="suggestion"></p>
<script>
var domains = ['hotmail.com', 'gmail.com', 'aol.com'];
var topLevelDomains = ["com", "net", "org"];
$('#email').on('blur', function(event) {
console.log("event ", event);
console.log("this ", $(this));
$(this).mailcheck({
domains: domains, // optional
topLevelDomains: topLevelDomains, // optional
suggested: function(element, suggestion) {
// callback code
console.log("suggestion ", suggestion.full);
$('#suggestion').html("Did you mean <b><i>" + suggestion.full + "</b></i>?");
},
empty: function(element) {
// callback code
$('#suggestion').html('No Suggestions :(');
}
});
});
</script>
</body>