Skip to content

Instantly share code, notes, and snippets.

@manikrathee
Created January 10, 2014 21:10
Show Gist options
  • Save manikrathee/8362671 to your computer and use it in GitHub Desktop.
Save manikrathee/8362671 to your computer and use it in GitHub Desktop.
A simple bit of JS to set a header image to 100% height
var windowHeight = $(window).innerHeight();
function viewportScale(){
$('#landing').css('height', windowHeight);
}
$(document).ready(function() {
viewportScale();
});
#landing {
background-size: cover;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment