jStepper: convenient numeric input text plugin

jStepper is a nice and really useful jQuery plugin that, once applied to a text input, only allows digits or numbers to be entered in it.

Setting it up as easy as

$(".txtTesting").jStepper({minValue:0, maxValue:23, minLength:2});

Look at jStepper in action at Hearthstone Calculator tool I've made recently. Here is the code that I'm using for hscalc:

$text.jStepper({
    minValue: minValue,
    maxValue: maxValue,
    allowDecimals: false,
    decimalSeparator: ".",
    onStep: function (objTextField, bDirection, bLimitReached) {
        $slider.slider("value", objTextField.val());
        updateAfterValuesChanged();
    }
});

jStepper homepage is handy, you can see all the options and apply them right away.

Not much else to be said. This tool just works, as intended. You would also like to know that author behind it, +Martin Kruse, is nice and helpful guy. A little bug I had for my corner case he fixed the same day. #h5yr, like Umbraco developers would say!


Share