Jquery increase/decrease number in input text by up/down arrows keyboard
<p>I have a basic quantity field and would like to allow the user to increase/decrease the number within this input box based on the keyboard up/down.</p>

<p>Following on from: EndangeredMassa answer on keyboard code <a href="http://stackoverflow.com/a/375426/560287">http://stackoverflow.com/a/375426/560287</a> how would I add this into a keyup function?</p>

<pre><code>var keynum = 0;

if(window.event) { keynum = e.keyCode; }  // IE (sucks)
else if(e.which) { keynum = e.which; }    // Netscape/Firefox/Opera

if(keynum == 38) { // up
    //Move selection up
}

if(keynum == 27) { // down
    //Move selection down
}
</code></pre>
