aboutsummaryrefslogtreecommitdiffstats
path: root/external/mousewheel/jquery.mousewheel.min.js
diff options
context:
space:
mode:
authorCa-Phun Ung <pazu2k@gmail.com>2009-05-11 04:29:30 +0000
committerCa-Phun Ung <pazu2k@gmail.com>2009-05-11 04:29:30 +0000
commit2291be6a65f8b0a23ec1cf44546cda0bc7147423 (patch)
treeb77a3d9952560692b1a3de811de3416fe7ae4123 /external/mousewheel/jquery.mousewheel.min.js
parentf6b219fdc4feaff1bb236f79590809db829e922e (diff)
downloadjquery-ui-2291be6a65f8b0a23ec1cf44546cda0bc7147423.tar.gz
jquery-ui-2291be6a65f8b0a23ec1cf44546cda0bc7147423.zip
spinner: added mousewheel plugin to trunk/external.
Diffstat (limited to 'external/mousewheel/jquery.mousewheel.min.js')
-rw-r--r--external/mousewheel/jquery.mousewheel.min.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/external/mousewheel/jquery.mousewheel.min.js b/external/mousewheel/jquery.mousewheel.min.js
new file mode 100644
index 000000000..05ebb0a99
--- /dev/null
+++ b/external/mousewheel/jquery.mousewheel.min.js
@@ -0,0 +1,11 @@
+/* Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
+ * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
+ * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
+ *
+ * Version: 3.0.2
+ *
+ * Requires: 1.2.2+
+ */
+(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery); \ No newline at end of file