Skip to content

Commit 9f7185b

Browse files
committed
add compatibility with jQuery 1.7
1 parent 0f136d8 commit 9f7185b

File tree

5 files changed

+26
-9
lines changed

5 files changed

+26
-9
lines changed

ChangeLog.markdown

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Mouse Wheel ChangeLog
22

3+
# 3.0.5
4+
5+
* jQuery 1.7 compatibility
6+
37
# 3.0.4
48

59
* Fix IE issue
@@ -55,4 +59,4 @@
5559

5660
* Fixed Opera issue
5761
* Fixed an issue with children elements that also have a mousewheel handler
58-
* Added ability to handle multiple handlers
62+
* Added ability to handle multiple handlers

LICENSE.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2010, Brandon Aaron (http://brandonaaron.net/)
1+
Copyright 2011, Brandon Aaron (http://brandonaaron.net/)
22

33
Permission is hereby granted, free of charge, to any person obtaining
44
a copy of this software and associated documentation files (the
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1717
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1818
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1919
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ Here is an example of using both the bind and helper method syntax.
2121

2222
The expandable plugin is licensed under the MIT License (LICENSE.txt).
2323

24-
Copyright (c) 2010 [Brandon Aaron](http://brandonaaron.net)
24+
Copyright (c) 2011 [Brandon Aaron](http://brandonaaron.net)

jquery.mousewheel.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
1+
/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
22
* Licensed under the MIT License (LICENSE.txt).
33
*
44
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
55
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
66
* Thanks to: Seamus Leahy for adding deltaX and deltaY
77
*
8-
* Version: 3.0.4
8+
* Version: 3.0.5
99
*
1010
* Requires: 1.2.2+
1111
*/
@@ -14,6 +14,12 @@
1414

1515
var types = ['DOMMouseScroll', 'mousewheel'];
1616

17+
if ($.event.fixHooks) {
18+
for ( var i=types.length; i; ) {
19+
$.event.fixHooks[ types[--i] ] = $.event.mouseHooks;
20+
}
21+
}
22+
1723
$.event.special.mousewheel = {
1824
setup: function() {
1925
if ( this.addEventListener ) {
@@ -72,7 +78,7 @@ function handler(event) {
7278
// Add event and delta to the front of the arguments
7379
args.unshift(event, delta, deltaX, deltaY);
7480

75-
return $.event.handle.apply(this, args);
81+
return ($.event.dispatch || $.event.handle).apply(this, args);
7682
}
7783

78-
})(jQuery);
84+
})(jQuery);

test/index.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22
<html>
33
<head>
44
<title>Testing mousewheel plugin</title>
5-
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>
5+
6+
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-git.js"></script>-->
7+
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.js"></script>
8+
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.js"></script>-->
9+
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.js"></script>-->
10+
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.3.2.js"></script>-->
11+
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.2.6.js"></script>-->
12+
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.2.2.js"></script>-->
613
<script type="text/javascript" src="../jquery.mousewheel.js"></script>
714

815
<style>

0 commit comments

Comments
 (0)