Skip to content

Commit

Permalink
Fix scroll navigation w/ the Bounce Bar #43
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuNls committed Jul 9, 2015
1 parent ca715df commit 28dd7a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions assets/js/home.logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ $( document ).ready(function() {
if(activeIndex === 1){
timeouts.push(setTimeout(countDownDisplay, 1000));
}

var scrollTo = $("#"+possibleIndex[activeIndex]).offset().top - $("#bouncebar").height() - $(".navbar").height();
console.log(scrollTo);
$('html, body').animate({
scrollTop: $("#"+possibleIndex[activeIndex]).offset().top + 5
scrollTop: scrollTo
}, 2000, function() {
animationUnderWay = false;
});
Expand Down

0 comments on commit 28dd7a9

Please sign in to comment.