Skip to content

Instantly share code, notes, and snippets.

@sshkarupa
Created March 29, 2015 21:15
Show Gist options
  • Save sshkarupa/e2bd0c8f5bde334e70a5 to your computer and use it in GitHub Desktop.
Save sshkarupa/e2bd0c8f5bde334e70a5 to your computer and use it in GitHub Desktop.
full size jumbotron
//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