diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js index 1c6a53b..7006a5e 100644 --- a/jquery.slimscroll.js +++ b/jquery.slimscroll.js @@ -368,7 +368,7 @@ if (isJump) { delta = y; - var offsetTop = delta / me[0].scrollHeight * me.outerHeight(); + var offsetTop = (delta / me[0].scrollHeight) * (me.outerHeight() - bar.height()); offsetTop = Math.min(Math.max(offsetTop, 0), maxTop); bar.css({ top: offsetTop + 'px' }); }