Skip to content

Instantly share code, notes, and snippets.

@brunohaveroth
Created November 23, 2015 11:48
Show Gist options
  • Save brunohaveroth/681f3c95268ee6f9ad76 to your computer and use it in GitHub Desktop.
Save brunohaveroth/681f3c95268ee6f9ad76 to your computer and use it in GitHub Desktop.
JQUERY LIB:
https://raw.githubusercontent.com/cdnjs/cdnjs/master/ajax/libs/jquery.inputmask/3.1.49/jquery.inputmask.bundle.min.js
HTML:
<input type="text" placeholder="Telefone*" name="telefone" class="input-phone" required>
CODE JS:
jQuery(".input-phone").inputmask({
mask: ['(99) 9999-9999', '(99) 99999-9999'],
keepStatic: true,
autoUnmask: true
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment