Skip to content

Commit e0ef5ca

Browse files
committed
Remove dependency on jQuery event/alias module
1 parent ddcb162 commit e0ef5ca

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

jquery.mousewheel.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@
8181

8282
$.fn.extend({
8383
mousewheel: function(fn) {
84-
return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
84+
return fn ? this.on('mousewheel', fn) : this.trigger('mousewheel');
8585
},
8686

8787
unmousewheel: function(fn) {
88-
return this.unbind('mousewheel', fn);
88+
return this.off('mousewheel', fn);
8989
}
9090
});
9191

jquery.mousewheel.min.js

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/scroll.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
$('#emulated').append(html);
3333
$('#native').append(html);
3434
}
35-
$('#emulated').bind('mousewheel', function(event) {
35+
$('#emulated').on('mousewheel', function(event) {
3636
event.preventDefault();
3737
var scrollTop = this.scrollTop;
3838
this.scrollTop = (scrollTop + ((event.deltaY * event.deltaFactor) * -1));

0 commit comments

Comments
 (0)