Reputation: 29
I want to make a div with the height of the window but can the height be auto-upgradeable?
$(document).ready(function() {
var hpd = $(document).height();
var hph = $(".header").height();
$('.wrapper').css({height: hpd })
$('.contenido').css({height: hpd-hph-1 })
});
Upvotes: 0
Views: 129
Reputation: 2163
Try this
$(document).ready(function(){
$(window).resize(function(){
$(".example").height ($(this).height());
});
});
Upvotes: 3