Skip to content

Commit

Permalink
This fixes #181 which makes scrolling smooth and responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
Frazer committed Jul 30, 2014
1 parent 832e791 commit 6b51392
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/unslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@
}
}).on('move', function(e) {
var left = 100 * e.distX / el.width();
_.ul.css("left", el.data("left") + left + "%");
var leftDelta = 100 * e.deltaX / el.width();
_.ul[0].style.left = parseInt(_.ul[0].style.left.replace("%", ""))+leftDelta+"%";

_.ul.data("left", left);
}).on('moveend', function(e) {
var left = _.ul.data("left");
Expand Down

0 comments on commit 6b51392

Please sign in to comment.