$(function(){
$('#email').bind('input', function(){
$(this).val(function(_, v){
return v.replace(/\s+/g, '');
});
});
});
Last active
July 6, 2016 06:40
-
-
Save evgv/42e6a9ae32daf44c3a1e101bf1b542bc to your computer and use it in GitHub Desktop.
jQuery. You can set any selector for field instead #email and you get realtime trim spacel from input, I'm use it for email fields.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment