Posts by Marco • 91 points
1 post
-
9
votes14
answers126839
viewsA: Phone Mask Using jQuery Mask Plugin
Quasi-atomic solution: $(".phone-mask").mask("(99) 9999-9999?9").on("focusout", function () { var len = this.value.replace(/\D/g, '').length; $(this).mask(len > 10 ? "(99) 99999-999?9" : "(99)…