Jquery to accept both negative and nonnegative values
<p>I have tried this. This accepts only integers. I want both negative and non negative.</p>

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