Add smooth down arrow navigation to /schools

This commit is contained in:
Matt Lott 2015-12-21 13:00:39 -08:00
parent 348e0407bc
commit 11d24e939b

View file

@ -11,6 +11,7 @@ module.exports = class SalesView extends RootView
'click .btn-contact-us': 'onClickContactUs' 'click .btn-contact-us': 'onClickContactUs'
'click .btn-create-account': 'onClickSignup' 'click .btn-create-account': 'onClickSignup'
'click .btn-login-account': 'onClickLogin' 'click .btn-login-account': 'onClickLogin'
'click #down-arrow': 'onClickDownArrow'
getTitle: -> getTitle: ->
'CodeCombat' 'CodeCombat'
@ -27,3 +28,9 @@ module.exports = class SalesView extends RootView
window.tracker?.trackEvent 'Started Signup', category: 'Sales', label: 'Sales Create' window.tracker?.trackEvent 'Started Signup', category: 'Sales', label: 'Sales Create'
logoutRedirectURL: false logoutRedirectURL: false
onClickDownArrow: (e) ->
$('#page-container').animate({
scrollTop: $('[name="' + $(e.target).closest('a').attr('href').substr(1) + '"]').offset().top
}, 300)
false