Speed up tab scrolling

This commit is contained in:
Nick O'Leary 2016-10-15 20:58:27 +01:00
parent 714c254bab
commit 5b22ccfca6
1 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ RED.tabs = (function() {
return; return;
} }
var currentScrollLeft = scrollContainer.scrollLeft(); var currentScrollLeft = scrollContainer.scrollLeft();
scrollContainer.animate( { scrollLeft: dir }, 300); scrollContainer.animate( { scrollLeft: dir }, 100);
var interval = setInterval(function() { var interval = setInterval(function() {
var newScrollLeft = scrollContainer.scrollLeft() var newScrollLeft = scrollContainer.scrollLeft()
if (newScrollLeft === currentScrollLeft) { if (newScrollLeft === currentScrollLeft) {
@ -61,8 +61,8 @@ RED.tabs = (function() {
return; return;
} }
currentScrollLeft = newScrollLeft; currentScrollLeft = newScrollLeft;
scrollContainer.animate( { scrollLeft: dir }, 300); scrollContainer.animate( { scrollLeft: dir }, 100);
},300); },100);
$(this).one('mouseup',function() { $(this).one('mouseup',function() {
clearInterval(interval); clearInterval(interval);
}) })