A Very Unpolished Collection of Examples

Generic input

<input type="number">

Input with min and max set

<input type="number" min="5" max="10">

Input with callback

Callbacks will respect min and max attributes.

  
    <input type="number" id="callback">
    <output id="callbackOutput"><output>
  
  
var incremented = 1,
    decremented = 1;
$('#callback').niceNumber({
  onIncrement: function ($currentInput, amount) {
    $('#callbackOutput').text(
      'Incremented ' + incremented++ + ' Times.',
    );
  },
  onDecrement: function ($currentInput, amount) {
    $('#callbackOutput').text(
      'Decremented ' + decremented++ + ' Times.',
    );
  },
});