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(); }; 

demo: http://jsfiddle.net/alan0xd7/w4s0v7y3/


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -