diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-05-05 14:38:49 -0500 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-05-12 09:27:05 -0500 |
commit | 94919b472425a7149f85cab0f3990e2f16d57c39 (patch) | |
tree | 84aac773606d8711ed70f3b58eecf15aa893e8aa /app/assets/javascripts/layout_nav.js | |
parent | 9059b99b75cd7ab5462ff36a36fe7a6c9984b0bf (diff) | |
download | gitlab-ce-94919b472425a7149f85cab0f3990e2f16d57c39.tar.gz |
Fade out border on scroll
Diffstat (limited to 'app/assets/javascripts/layout_nav.js')
-rw-r--r-- | app/assets/javascripts/layout_nav.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/assets/javascripts/layout_nav.js b/app/assets/javascripts/layout_nav.js index 341fc6fc3e4..17dc3161a1e 100644 --- a/app/assets/javascripts/layout_nav.js +++ b/app/assets/javascripts/layout_nav.js @@ -48,12 +48,8 @@ import _ from 'underscore'; }); function applyScrollNavClass() { - if ($(window).scrollTop() > 0) { - $('.navbar-gitlab').addClass('scroll'); - } else { - $('.navbar-gitlab').removeClass('scroll'); - } + $('.navbar-border').css("opacity", $(window).scrollTop() / 40); } - $(window).scroll( _.throttle(applyScrollNavClass, 250)); + $(window).scroll( _.throttle(applyScrollNavClass, 100)); }).call(window); |