Fix scrollToLink, including removing unneeded offset

This commit is contained in:
Scott Erickson 2016-02-16 10:47:49 -08:00
parent 73657d5428
commit c2f02ebbfb

View file

@ -441,8 +441,8 @@ module.exports = class CocoView extends Backbone.View
slider
scrollToLink: (link, speed=300) ->
scrollTo = $(link).offset().top + $('#page-container')[0].scrollTop
$('#page-container').animate({ scrollTop: scrollTo }, speed)
scrollTo = $(link).offset().top
$('body').animate({ scrollTop: scrollTo }, speed)
toggleFullscreen: (e) ->
# https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode?redirectlocale=en-US&redirectslug=Web/Guide/DOM/Using_full_screen_mode