Skip to content

Instantly share code, notes, and snippets.

@Nikolasgrizli
Forked from agragregra/header_fadeout.js
Created March 19, 2018 05:43
Show Gist options
  • Save Nikolasgrizli/ca8a492b57a8eb4900fc6fb6a898b207 to your computer and use it in GitHub Desktop.
Save Nikolasgrizli/ca8a492b57a8eb4900fc6fb6a898b207 to your computer and use it in GitHub Desktop.
jQuery Header Content FadeOut on Scroll
$(window).scroll(function() {
var st = $(this).scrollTop();
if($(window).height()+500 > $("header").height()) {
$("header .col-md-12").css({
"transform" : "translate3d(0px, " + st /18 + "%, 0px)",
"-webkit-transform" : "translate3d(0px, " + st /18 + "%, 0px)",
"opacity" : "1" - st/700
});
};
});
@preedasaky
Copy link

...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment