[jQuery] Checking if input is a number.

[jQuery] Checking if input is a number.


i have a serach box that checks for a product code or product keyword.
I need to find out how i can check if the input submitted on this
search box is a number, and if it is, remove any white spaces.
The reason is that product codes coming from a feed have a space in
them and it is much easier if i sue jquery rather than go through a
collection fo nearly 20,000 codes.
can anyone point me in the right direction?