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
|
@ -445,6 +445,9 @@ module.exports = class CocoView extends Backbone.View
|
|||
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
|
||||
# Whoa, even cooler: https://developer.mozilla.org/en-US/docs/WebAPI/Pointer_Lock
|
||||
|
|
Loading…
Reference in a new issue