Created
June 27, 2013 20:03
-
-
Save coreyrothwell/5879880 to your computer and use it in GitHub Desktop.
jQuery replace input field commas. Just add a .no-comma class to the input and include this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$('.no-comma').on('input',function(e){ | |
var input = $(this), | |
newVal = input.val().replace(/\,/gi,''); | |
input.val(newVal); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment