Add wheel scroll function.
This commit is contained in:
Vendored
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
/* Copyright (c) 2012 HyeonJe Jun (http://github.com/noraesae)
|
/* Copyright (c) 2012 HyeonJe Jun (http://github.com/noraesae)
|
||||||
* Licensed under the MIT License
|
* 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($) {
|
((function($) {
|
||||||
$.fn.perfectScrollbar = 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));
|
})(jQuery));
|
||||||
|
|||||||
Reference in New Issue
Block a user