summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/layout_nav.js
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-05-05 14:38:49 -0500
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-05-12 09:27:05 -0500
commit94919b472425a7149f85cab0f3990e2f16d57c39 (patch)
tree84aac773606d8711ed70f3b58eecf15aa893e8aa /app/assets/javascripts/layout_nav.js
parent9059b99b75cd7ab5462ff36a36fe7a6c9984b0bf (diff)
downloadgitlab-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.js8
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);