Last active
April 10, 2016 16:57
-
-
Save aligator28/b49244238c6fef12b133e5dfa902ce1e to your computer and use it in GitHub Desktop.
Resize some element when window resizes
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
$(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