Add wheel scroll function.

This commit is contained in:
Hyunje Alex Jun
2012-11-06 22:35:27 +09:00
parent b409aa3ff3
commit ca22fedf65
2 changed files with 6 additions and 2 deletions

View File

@@ -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));