I have tried this. This accepts only integers. I want both negative and non negative.

```
    $(function () {
        $('.spinner').keyup(function () {
            if (this.value.match(/[^0-9]/g)) {
                this.value = this.value.replace(/[^0-9]/g, '');
            }
        });
    });

```