Skip to content

Instantly share code, notes, and snippets.

@dudesl
Created June 17, 2015 18:22
Show Gist options
  • Save dudesl/23f85a38c1b1b383bd7b to your computer and use it in GitHub Desktop.
Save dudesl/23f85a38c1b1b383bd7b to your computer and use it in GitHub Desktop.
simple-masker
$('#streetNumber').on('input', function(event){
var targetValue = event.target.value,
pattern = /\D/g;
event.target.value = targetValue.replace(pattern, '');
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment