Skip to content

Instantly share code, notes, and snippets.

@aligator28
Last active April 10, 2016 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aligator28/b49244238c6fef12b133e5dfa902ce1e to your computer and use it in GitHub Desktop.
Save aligator28/b49244238c6fef12b133e5dfa902ce1e to your computer and use it in GitHub Desktop.
Resize some element when window resizes
$(document).ready(function() {
function heightDetect() {
//make header height same as window height
$('.main_head').css('height', $(window).height());
}
heightDetect();
$(window).resize(function() {
heightDetect();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment