I have this:
$('.onealphaonly').bind('keyup blur',function(){
var node = $(this);
node.val(node.val().replace(/[^a-zA-Z]/g{1},'') ); }
);
where what I hope it would do is that it allows the user to input only one letter in an input field. It accepts only letters for now, but I cannot make it to allow only one letter (and have searched dozens of SO answers). Any ideas?