mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Add CocoView.scrollToTop
This commit is contained in:
parent
e6593dea8d
commit
2a399e71fa
1 changed files with 3 additions and 0 deletions
|
@ -444,6 +444,9 @@ module.exports = class CocoView extends Backbone.View
|
|||
scrollToLink: (link, speed=300) ->
|
||||
scrollTo = $(link).offset().top
|
||||
$('html, body').animate({ scrollTop: scrollTo }, speed)
|
||||
|
||||
scrollToTop: (speed=300) ->
|
||||
$('html, body').animate({ scrollTop: 0 }, 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