Skip to content

Commit cc3014b

Browse files
committed
adding option if element is already hovered
if element is already hovered like if you have applied slimscroll to whole body it will not fire scroll
1 parent c1d1c79 commit cc3014b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

jquery.slimscroll.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
// sets rail color
4949
railColor : '#333',
5050

51+
//if already mouse is there
52+
mouseOver:false,
53+
5154
// sets rail opacity
5255
railOpacity : .2,
5356

@@ -333,6 +336,13 @@
333336
if (!releaseScroll) { e.returnValue = false; }
334337
}
335338

339+
//if element is allready hovered
340+
if(o.mouseOver){
341+
isOverPanel = true;
342+
showBar();
343+
hideBar();
344+
}
345+
336346
function scrollContent(y, isWheel, isJump)
337347
{
338348
releaseScroll = false;

0 commit comments

Comments
 (0)