Posted By

vagrantradio on 04/25/12


Tagged

replace


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

BrockSamsom


jQuery Masked Input - Unmask Function


 / Published in: jQuery
 

Removes anything that isn't a digit from input on complete.

  1. $("#PHONE1, #PHONE2, #FAX, #CELL").each(function() {
  2. $(this).mask("(999)999-9999", {
  3. completed : function () {
  4. $(this).val($(this).val().replace(/\D/g, "")).unmask();
  5. }
  6. });
  7. });

Report this snippet  

You need to login to post a comment.