diff options
author | Josh Angell <josh@supercooldesign.co.uk> | 2012-03-01 13:03:51 +0000 |
---|---|---|
committer | Josh Angell <josh@supercooldesign.co.uk> | 2012-03-01 13:03:51 +0000 |
commit | dfc33031a0a18d60929369d6ce44a730a9162b07 (patch) | |
tree | 9017341bb639287230a7bcb64717dd5ec35536f8 | |
parent | 634fd777c49947a71cb7d653382963381cd2b385 (diff) |
Use offset for skip to nave on mobile
Signed-off-by: Josh Angell <josh@supercooldesign.co.uk>
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index 3f6b5c721..a9341d949 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -303,8 +303,8 @@ $(function(){ */ $('.mobile').on('click', '#nav-link', function(e){ e.preventDefault(); - var foo = $('.wrapper').height() - 500; - $('html, body').animate({scrollTop:foo}, 1000); + var offset = $('#main-nav').offset().top; + $('html, body').animate({scrollTop:offset}, 1000); }); |