Autocomplete domain part of e-mail after type any chars after @
.
- Wrap HTML
<input>
element with:
<span class="emailHint">
<input name="email">
<span class="emailHint-hint"></span>
</span>
- Add CSS class selectors
.emailHint-measure
and.emailHint-hint
toinput
declaration:
input,
.emailHint-measure,
.emailHint-hint {
/* some styles */
}
-
Link
emailHint.js
. -
Init with className and domains list:
EmailHint.init(
"emailHint", // className
[
"gmail.com",
/* … */
]
);