mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 15:48:11 -05:00
Fix scrollToLink, including removing unneeded offset
This commit is contained in:
parent
73657d5428
commit
c2f02ebbfb
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue