Skip to content

Commit

Permalink
Remove dependency on jQuery event/alias module
Browse files Browse the repository at this point in the history
  • Loading branch information
arschmitz committed May 22, 2015
1 parent 1a422d4 commit 876bcf2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions jquery.mousewheel.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@

$.fn.extend({
mousewheel: function(fn) {
return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
return fn ? this.on('mousewheel', fn) : this.trigger('mousewheel');
},

unmousewheel: function(fn) {
return this.unbind('mousewheel', fn);
return this.off('mousewheel', fn);
}
});

Expand Down
12 changes: 6 additions & 6 deletions jquery.mousewheel.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/scroll.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
$('#emulated').append(html);
$('#native').append(html);
}
$('#emulated').bind('mousewheel', function(event) {
$('#emulated').on('mousewheel', function(event) {
event.preventDefault();
var scrollTop = this.scrollTop;
this.scrollTop = (scrollTop + ((event.deltaY * event.deltaFactor) * -1));
Expand Down

0 comments on commit 876bcf2

Please sign in to comment.