diff --git a/js/jquery.knob.js b/js/jquery.knob.js index 32caa3d..4e3a80c 100644 --- a/js/jquery.knob.js +++ b/js/jquery.knob.js @@ -455,9 +455,10 @@ var s = this, mw = function (e) { e.preventDefault(); + //IE10 - wheelDelta as a fallback var ori = e.originalEvent - ,deltaX = ori.detail || ori.wheelDeltaX - ,deltaY = ori.detail || ori.wheelDeltaY + ,deltaX = ori.detail || (ori.wheelDeltaX || ori.wheelDelta) + ,deltaY = ori.detail || (ori.wheelDeltaY || ori.wheelDelta) ,v = parseInt(s.$.val()) + (deltaX>0 || deltaY>0 ? s.o.step : deltaX<0 || deltaY<0 ? -s.o.step : 0); if ( @@ -530,8 +531,11 @@ } ); - this.$c.bind("mousewheel DOMMouseScroll", mw); - this.$.bind("mousewheel DOMMouseScroll", mw) + //Replaced 'bind' with 'on' as the former is deprecated now + //this.$c.bind("mousewheel DOMMouseScroll", mw); + //this.$.bind("mousewheel DOMMouseScroll", mw) + this.$c.on("mousewheel DOMMouseScroll", mw); + this.$.on("mousewheel DOMMouseScroll", mw); }; this.init = function () {