Created
March 29, 2015 21:15
-
-
Save sshkarupa/e2bd0c8f5bde334e70a5 to your computer and use it in GitHub Desktop.
full size jumbotron
This file contains 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
//make jumbotron adjust to full size of user's viewport on load and after resize | |
function adjustJumbo(){ | |
$('.jumbotron').outerHeight($(window).height()-120); | |
} | |
adjustJumbo(); | |
$(window).resize(function() {adjustJumbo();}); | |
//make a red arrow under the jumbotron move with the scrolling and disappear | |
$(window).scroll(function() { | |
var coords = ($(window).scrollTop() / 6 ).toFixed(1); | |
$('#pointer').css( {"top": (coords + "px"), "opacity": (1 - coords / 50)} ); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment