<title>jQuery UI Spinner - Default functionality</title>\r
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />\r
<script type="text/javascript" src="../../jquery-1.4.3.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.2.js"></script>\r
+ <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>\r
<script type="text/javascript" src="../../external/glob.js"></script>\r
<script type="text/javascript" src="../../external/glob.de-DE.js"></script>\r
<script type="text/javascript" src="../../external/glob.ja-JP.js"></script>\r
<title>jQuery UI Spinner - decimal</title>\r
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />\r
<script type="text/javascript" src="../../jquery-1.4.3.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.2.js"></script>\r
+ <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>\r
<script type="text/javascript" src="../../external/glob.js"></script>\r
<script type="text/javascript" src="../../external/glob.de-DE.js"></script>\r
<script type="text/javascript" src="../../external/glob.ja-JP.js"></script>\r
<title>jQuery UI Spinner - Default functionality</title>\r
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />\r
<script type="text/javascript" src="../../jquery-1.4.3.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.2.js"></script>\r
+ <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>\r
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>\r
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>\r
<script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>\r
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />\r
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>\r
<script type="text/javascript" src="../../jquery-1.4.3.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.2.js"></script>\r
+ <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>\r
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>\r
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>\r
<script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>\r
<title>jQuery UI Spinner - Default functionality</title>\r
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />\r
<script type="text/javascript" src="../../jquery-1.4.3.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.2.js"></script>\r
+ <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>\r
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>\r
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>\r
<script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>\r
+++ /dev/null
-/*! Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)\r
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)\r
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.\r
- * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.\r
- * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.\r
- *\r
- * Version: 3.0.2\r
- * \r
- * Requires: 1.2.2+\r
- */\r
-\r
-(function($) {\r
-\r
-var types = ['DOMMouseScroll', 'mousewheel'];\r
-\r
-$.event.special.mousewheel = {\r
- setup: function() {\r
- if ( this.addEventListener )\r
- for ( var i=types.length; i; )\r
- this.addEventListener( types[--i], handler, false );\r
- else\r
- this.onmousewheel = handler;\r
- },\r
- \r
- teardown: function() {\r
- if ( this.removeEventListener )\r
- for ( var i=types.length; i; )\r
- this.removeEventListener( types[--i], handler, false );\r
- else\r
- this.onmousewheel = null;\r
- }\r
-};\r
-\r
-$.fn.extend({\r
- mousewheel: function(fn) {\r
- return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");\r
- },\r
- \r
- unmousewheel: function(fn) {\r
- return this.unbind("mousewheel", fn);\r
- }\r
-});\r
-\r
-\r
-function handler(event) {\r
- var args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true;\r
- \r
- event = $.event.fix(event || window.event);\r
- event.type = "mousewheel";\r
- \r
- if ( event.wheelDelta ) delta = event.wheelDelta/120;\r
- if ( event.detail ) delta = -event.detail/3;\r
- \r
- // Add events and delta to the front of the arguments\r
- args.unshift(event, delta);\r
-\r
- return $.event.handle.apply(this, args);\r
-}\r
-\r
-})(jQuery);
\ No newline at end of file
--- /dev/null
+/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)\r
+ * Licensed under the MIT License (LICENSE.txt).\r
+ *\r
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.\r
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.\r
+ * Thanks to: Seamus Leahy for adding deltaX and deltaY\r
+ *\r
+ * Version: 3.0.4\r
+ * \r
+ * Requires: 1.2.2+\r
+ */\r
+\r
+(function($) {\r
+\r
+var types = ['DOMMouseScroll', 'mousewheel'];\r
+\r
+$.event.special.mousewheel = {\r
+ setup: function() {\r
+ if ( this.addEventListener ) {\r
+ for ( var i=types.length; i; ) {\r
+ this.addEventListener( types[--i], handler, false );\r
+ }\r
+ } else {\r
+ this.onmousewheel = handler;\r
+ }\r
+ },\r
+ \r
+ teardown: function() {\r
+ if ( this.removeEventListener ) {\r
+ for ( var i=types.length; i; ) {\r
+ this.removeEventListener( types[--i], handler, false );\r
+ }\r
+ } else {\r
+ this.onmousewheel = null;\r
+ }\r
+ }\r
+};\r
+\r
+$.fn.extend({\r
+ mousewheel: function(fn) {\r
+ return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");\r
+ },\r
+ \r
+ unmousewheel: function(fn) {\r
+ return this.unbind("mousewheel", fn);\r
+ }\r
+});\r
+\r
+\r
+function handler(event) {\r
+ var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;\r
+ event = $.event.fix(orgEvent);\r
+ event.type = "mousewheel";\r
+ \r
+ // Old school scrollwheel delta\r
+ if ( event.wheelDelta ) { delta = event.wheelDelta/120; }\r
+ if ( event.detail ) { delta = -event.detail/3; }\r
+ \r
+ // New school multidimensional scroll (touchpads) deltas\r
+ deltaY = delta;\r
+ \r
+ // Gecko\r
+ if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {\r
+ deltaY = 0;\r
+ deltaX = -1*delta;\r
+ }\r
+ \r
+ // Webkit\r
+ if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }\r
+ if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }\r
+ \r
+ // Add event and delta to the front of the arguments\r
+ args.unshift(event, delta, deltaX, deltaY);\r
+ \r
+ return $.event.handle.apply(this, args);\r
+}\r
+\r
+})(jQuery);
\ No newline at end of file
<link type="text/css" href="../../../themes/base/jquery.ui.spinner.css" rel="stylesheet" />\r
\r
<script type="text/javascript" src="../../../jquery-1.4.3.js"></script>\r
- <script type="text/javascript" src="../../../external/jquery.mousewheel-3.0.2.js"></script>\r
+ <script type="text/javascript" src="../../../external/jquery.mousewheel-3.0.4.js"></script>\r
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>\r
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>\r
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>\r
</ol>\r
\r
<div id="qunit-fixture">\r
- <input id="spin">\r
+ <input id="spin" class="foo">\r
<input id="spin2" value="2">\r
</div>\r
\r