Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions slimScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Version: 0.4.0
* Version: 0.4.1
*
*/
(function($) {
Expand Down Expand Up @@ -179,7 +179,7 @@
if (isWheel)
{
// move bar with mouse wheel
delta = bar.position().top + y * wheelStep;
delta = parseInt( bar.css('top') ) + y * wheelStep;

// move bar, make sure it doesn't go out
delta = Math.max(delta, 0);
Expand All @@ -191,7 +191,7 @@
}

// calculate actual scroll amount
var percentScroll = parseInt(bar.position().top) / (me.outerHeight() - bar.outerHeight());
var percentScroll = parseInt( bar.css('top') ) / (me.outerHeight() - bar.outerHeight());
delta = percentScroll * (me[0].scrollHeight - me.outerHeight());

if (isJump)
Expand Down
9 changes: 2 additions & 7 deletions slimScroll.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.