Skip to content

Commit 7212a18

Browse files
committed
Provide a new option 'disableFadeOut', which keeps the scrollbar visible as long as the mouse has not left the scrollable div.
1 parent 162089f commit 7212a18

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

slimScroll.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
start : 'top',
2222
opacity : .4,
2323
alwaysVisible : false,
24+
disableFadeOut: false,
2425
railVisible : false,
2526
railColor : '#333',
2627
railOpacity : '0.2',
@@ -49,6 +50,7 @@
4950
distance = o.distance,
5051
start = o.start,
5152
opacity = o.opacity,
53+
disableFadeOut = o.disableFadeOut,
5254
alwaysVisible = o.alwaysVisible,
5355
railVisible = o.railVisible,
5456
railColor = o.railColor,
@@ -282,7 +284,7 @@
282284
if (!alwaysVisible)
283285
{
284286
queueHide = setTimeout(function(){
285-
if (!isOverBar && !isDragg)
287+
if (!(disableFadeOut && isOverPanel) && !isOverBar && !isDragg)
286288
{
287289
bar.fadeOut('slow');
288290
rail.fadeOut('slow');

0 commit comments

Comments
 (0)