diff options
author | Josh Angell <josh@supercooldesign.co.uk> | 2012-02-16 14:05:25 +0000 |
---|---|---|
committer | Josh Angell <josh@supercooldesign.co.uk> | 2012-02-16 14:05:25 +0000 |
commit | 1107f1e2b90acd017c44c499f975797e85e43b9e (patch) | |
tree | 4ff894a40bac43ca65a5cbae334a4dc82cd1d132 /web/js | |
parent | 0be44ef5ee0c8f6d8beda671a391dfdf080d8484 (diff) |
animate the skip to nave ;)
Signed-off-by: Josh Angell <josh@supercooldesign.co.uk>
Diffstat (limited to 'web/js')
-rw-r--r-- | web/js/fixmystreet.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js index 19f1f0402..7967e3d7d 100644 --- a/web/js/fixmystreet.js +++ b/web/js/fixmystreet.js @@ -282,4 +282,13 @@ $(function(){ e.preventDefault(); tabs($(this)); }); + + /* + * Skip to nav on mobile + */ + $('.mobile').on('click', '#nav-link', function(e){ + e.preventDefault(); + var foo = $('.wrapper').height() - $('main-nav').height(); + $('html, body').animate({scrollTop:foo}, 1000); + }); });
\ No newline at end of file |