Upgraded phpmyadmin to 4.0.4 (All Languages) - No modifications yet
[openemr.git] / phpmyadmin / js / jquery / jquery.mousewheel.js
blob9d815f072ccf72d5ef93c90b7d2b1f0d1b9ab794
1 /*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
2  * Licensed under the MIT License (LICENSE.txt).
3  *
4  * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
5  * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
6  * Thanks to: Seamus Leahy for adding deltaX and deltaY
7  *
8  * Version: 3.0.6
9  * 
10  * Requires: 1.2.2+
11  */
12 (function(d){var b=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks){for(var a=b.length;a;){d.event.fixHooks[b[--a]]=d.event.mouseHooks}}d.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var e=b.length;e;){this.addEventListener(b[--e],c,false)}}else{this.onmousewheel=c}},teardown:function(){if(this.removeEventListener){for(var e=b.length;e;){this.removeEventListener(b[--e],c,false)}}else{this.onmousewheel=null}}};d.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}});function c(j){var h=j||window.event,g=[].slice.call(arguments,1),k=0,i=true,f=0,e=0;j=d.event.fix(h);j.type="mousewheel";if(h.wheelDelta){k=h.wheelDelta/120}if(h.detail){k=-h.detail/3}e=k;if(h.axis!==undefined&&h.axis===h.HORIZONTAL_AXIS){e=0;f=-1*k}if(h.wheelDeltaY!==undefined){e=h.wheelDeltaY/120}if(h.wheelDeltaX!==undefined){f=-1*h.wheelDeltaX/120}g.unshift(j,k,f,e);return(d.event.dispatch||d.event.handle).apply(this,g)}})(jQuery);