From bb0bc263462d5f3ed5ada3ce927b989efb9c837b Mon Sep 17 00:00:00 2001 From: Avinash Date: Thu, 21 Jun 2012 15:31:41 +0530 Subject: [PATCH] Supports mousewheel scrolling only in horizontal direction. Signed-off-by: Avinash --- js/jquery.smoothDivScroll-1.2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/jquery.smoothDivScroll-1.2.js b/js/jquery.smoothDivScroll-1.2.js index bf2ef83..f91bcd8 100644 --- a/js/jquery.smoothDivScroll-1.2.js +++ b/js/jquery.smoothDivScroll-1.2.js @@ -228,8 +228,8 @@ /***************************************** SET UP EVENT FOR MOUSEWHEEL SCROLLING *****************************************/ - el.data("scrollableArea").mousewheel(function (event, delta) { - if (el.data("enabled") && o.mousewheelScrolling) { + el.data("scrollableArea").mousewheel(function (event, delta, deltaX, deltaY) { + if (el.data("enabled") && o.mousewheelScrolling && deltaX && deltaY === 0) { event.preventDefault(); // Stop any ongoing autoscrolling if it's running