Add wheel scroll function.
This commit is contained in:
parent
b409aa3ff3
commit
ca22fedf65
2
min/perfect-scrollbar.min.js
vendored
2
min/perfect-scrollbar.min.js
vendored
@ -1,3 +1,3 @@
|
||||
/* Copyright (c) 2012 HyeonJe Jun (http://github.com/noraesae)
|
||||
* Licensed under the MIT License
|
||||
*/(function(e){e.fn.perfectScrollbar=function(){}})(jQuery);
|
||||
*/(function(e){e.fn.perfectScrollbar=function(){e(this).mousewheel(function(t,n,r,i){e(this).scrollTop(e(this).scrollTop()-i*10),e(this).scrollLeft(e(this).scrollLeft()+r*10),t.preventDefault()})}})(jQuery);
|
@ -3,6 +3,10 @@
|
||||
*/
|
||||
((function($) {
|
||||
$.fn.perfectScrollbar = function() {
|
||||
// TODO
|
||||
$(this).mousewheel(function(e, delta, deltaX, deltaY) {
|
||||
$(this).scrollTop($(this).scrollTop() - (deltaY * 10));
|
||||
$(this).scrollLeft($(this).scrollLeft() + (deltaX * 10));
|
||||
e.preventDefault();
|
||||
});
|
||||
};
|
||||
})(jQuery));
|
||||
|
Loading…
Reference in New Issue
Block a user