read the source code of jquery-knob.js, search 'scroll',you will find this code:
this.$c.bind("mousewheel DOMMouseScroll", mw);
this.$.bind("mousewheel DOMMouseScroll", mw);
there is no config to determine whether use scroll or not, you can comment this code to get work,but you will run into problem if your lib files are managed by bower or npm...... each time you update you lib files, you need to comment again.
so another way to disable scroll is:
$(".dial").knob({
min: 1
max: 10
stopper: true,
readOnly: true,//if true This will Set the Knob readonly cannot click
release: function (value) {
//Do something as you release the mouse
}
}).children().off('mousewheel DOMMouseScroll');
typically, the '.dial'
element is a input element, you call knob method to initialize a knob, and it returns a div(in jquery element style) wraps the '.dial'
element(the $ of this
in source code above) and and a newly added canvas element(the $c of this
in source code above),so we call children().off('mousewheel DOMMouseScroll')
to remove scroll event listeners