From 11d24e939bdb984f21048b6740e736b55ab6ac52 Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Mon, 21 Dec 2015 13:00:39 -0800 Subject: [PATCH] Add smooth down arrow navigation to /schools --- app/views/SalesView.coffee | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/SalesView.coffee b/app/views/SalesView.coffee index 2f1b897ad..ad24217fd 100644 --- a/app/views/SalesView.coffee +++ b/app/views/SalesView.coffee @@ -11,6 +11,7 @@ module.exports = class SalesView extends RootView 'click .btn-contact-us': 'onClickContactUs' 'click .btn-create-account': 'onClickSignup' 'click .btn-login-account': 'onClickLogin' + 'click #down-arrow': 'onClickDownArrow' getTitle: -> 'CodeCombat' @@ -27,3 +28,9 @@ module.exports = class SalesView extends RootView window.tracker?.trackEvent 'Started Signup', category: 'Sales', label: 'Sales Create' logoutRedirectURL: false + + onClickDownArrow: (e) -> + $('#page-container').animate({ + scrollTop: $('[name="' + $(e.target).closest('a').attr('href').substr(1) + '"]').offset().top + }, 300) + false