javascript - jQuery mask input without changing value -
i using masked-input-plugin changes value , field becomes invalid ...
in js
$phoneinput.mask('99-99-99-999'); and later in browser console
('.phone-input-order-form').val() "99-99-99-999" is there way val "999999999" while masked ?
i thinking extend jquery val maybe know better way? maybe without plugin? :d
overriding jquery's val() function might cause unexpected issues other scripts. maybe try this:
$.fn.maskval = function () { return $(this).mask(); };
Comments
Post a Comment