A text input’s value attribute will always return a string. You need to parseInt the value to get an integer:
parseInt($('#myInput').val(), 10);
A text input’s value attribute will always return a string. You need to parseInt the value to get an integer:
parseInt($('#myInput').val(), 10);