Disable Scroll Wheel On Number Inputs

Posted By Weston Ganger

I dont really like how the scroll can increase or decrease the number inputs. I was finding myself wrongly changing data.

Heres how to disable it on all number inputs.

$(function(){
  $(':input[type=number]').on('mousewheel',function(e){ $(this).blur(); });
});

Related External Links:

Article Topic:Software Development - Javascript

Date:June 15, 2015