Here is a quick solution I created some time ago. you can read more about it in my article:
to Allow only numbers (numeric) in a field with jQuery:
$("#textfield").bind("keyup paste", function(){
setTimeout(jQuery.proxy(function() {
this.val(this.val().replace(/[^0-9]/g, ''));
}, $(this)), 0);
});