Put all code inside one of these: (function($) {})(jQuery);
Switched from jQuery-UI Spinner to input[type=number].

This is to avoid complications and generally have a more robust and modern solution.
Made CSS more specific.
Out-of-range values will be replaced with their previous value.