Skip to content

Commit

Permalink
Fixed compatibility issues when jquery is included
Browse files Browse the repository at this point in the history
  • Loading branch information
asafdav committed Feb 4, 2014
1 parent f95e848 commit 643a4a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/ng-scrollbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ angular.module('ngScrollbar', []).directive('ngScrollbar', [
thumbLine.css(draggerLineStyle);
track.bind('click', trackClick);
var wheelEvent = win[0].onmousewheel !== undefined ? 'mousewheel' : 'DOMMouseScroll';
transculdedContainer.bind(wheelEvent, wheelHandler);
transculdedContainer[0].addEventListener(wheelEvent, wheelHandler, false);
thumb.bind('mousedown', function (event) {
lastOffsetY = event.pageY - thumb[0].offsetTop;
win.bind('mouseup', function () {
Expand Down
4 changes: 2 additions & 2 deletions dist/ng-scrollbar.min.js

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

3 changes: 2 additions & 1 deletion src/ng-scrollbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ angular.module('ngScrollbar', []).

// Handl mousewheel
var wheelEvent = win[0].onmousewheel !== undefined ? 'mousewheel' : 'DOMMouseScroll';
transculdedContainer.bind(wheelEvent, wheelHandler);
transculdedContainer[0].addEventListener(wheelEvent, wheelHandler, false);


// Drag the scroller
thumb.bind('mousedown', function(event) {
Expand Down

0 comments on commit 643a4a0

Please sign in to comment.