From fd56fdfe026c9180dcb0f43a356824fc04e16377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0ar=C5=ABnas=20Dubinskas?= Date: Mon, 7 Jul 2014 10:42:37 +0300 Subject: [PATCH] Add ps-active-* class on container then scrollbar is active --- src/perfect-scrollbar.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/perfect-scrollbar.js b/src/perfect-scrollbar.js index 2a686f4..76d17b7 100644 --- a/src/perfect-scrollbar.js +++ b/src/perfect-scrollbar.js @@ -192,6 +192,18 @@ $scrollbarX.css({left: scrollbarXLeft, width: scrollbarXWidth}); $scrollbarY.css({top: scrollbarYTop, height: scrollbarYHeight}); + + if (scrollbarXActive) { + $this.addClass('ps-active-x'); + } else { + $this.removeClass('ps-active-x'); + } + + if (scrollbarYActive) { + $this.addClass('ps-active-y'); + } else { + $this.removeClass('ps-active-y'); + } }; var updateBarSizeAndPosition = function () {