jQuery Increment Plugin – Now with Mousewheel Support 1

jQuery Increment Plugin

jQuery Increment Plugin

The latest version of the jQuery Increment plugin (v. 0.6) now supports use of the mousewheel plugin by Brandon Aaron to increment/decrement numeric input values. Ensure scripts are loaded in the proper order (jquery » mousewheel » increment).

Try it out: jQuery Increment Demo


Download Increment Now

See the original Increment blog post.

One comment on “jQuery Increment Plugin – Now with Mousewheel Support

  1. Reply Alex Jun 14,2010 3:20 pm

    Hi,Sean O!
    Thanks for the wonderful script. I have added incremental buttons “+” and “-“.

    if (delta > 0 || e.which == 38 || e.which == 107) {
    changeTime($id, ‘add’);
    // newval = parseFloat(num) + 1 * (e.shiftKey ? .1 : 1);
    }
    else if ( delta < 0 || e.which == 40 || e.which == 109 ) {
    changeTime($id, 'sub');
    //newval = parseFloat(num) – 1 * (e.shiftKey ? .1 : 1);
    }

    Could you please advise how to restore default actions of "backspace" and "delete" buttons. I did something like this:
    // backspace
    else if ( e.which == 8 ) {
    changeAmount($id,'back');
    }
    […]
    else if (action == 'back') {
    // don't allow decrementing below minimum
    if (v == opts.minVal) return false;
    v = String (v);
    v = v.slice(0,v.length-1);
    }
    But it's not quite right, because it removes only the last digit.

Leave a Reply