Created
May 5, 2015 21:35
-
-
Save agragregra/52e992406069e50c8641 to your computer and use it in GitHub Desktop.
jQuery Header Content FadeOut on Scroll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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 | |
}); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment