Skip to content

Instantly share code, notes, and snippets.



Last active Sep 14, 2017
What would you like to do?
Máscara em jQuery para o oite e nove dígitos
// <![CDATA[
jQuery(function($) {
//Inicio Mascara Telefone
var phone, element;
element = $(this);
phone = element.val().replace(/\D/g, '');
if(phone.length > 10) {
element.mask("(99) 99999-999?9");
} else {
element.mask("(99) 9999-9999?9");
//Fim Mascara Telefone
// ]]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.