Content não redimensiona
Ola,
Eu criei um script que trata da altura da div principal do site a fim dela sempre permanecer fullscreen.
Porém ao redimensionar a página a div não redimensiona, só faz esse redimensionamento ao atualizar a página.
E eu já revirei o script e não consegui encontrar uma solução...
Aqui é o trecho do código que eu montei:
$(function () {
$(window).bind("load resize", function() {
var classContent = $("#content").attr("class");
var bodyHeight = $(window).height();
var headerHeight = $("#header").height();
var footerHeight = $("#footer").height();
var contentWidth = $(window).innerWidth();
var contHeight = $("#content").height();
var contentHeight = bodyHeight - headerHeight - footerHeight - 4;
var contentHeight2 = bodyHeight - footerHeight - 4;
if((contHeight < contentHeight)){
$("#mario4").css("height",contentHeight);
$("html").css("overflow","hidden");
}else if((classContent === 'index')){
$("#content").css("height",contentHeight);
$(".swiper-wrapper").css("height",contentHeight);
$(".swiper-slide").css("height",contentHeight);
$("html").css("overflow","hidden");
}else{
$("#content").css("height","auto");
}
});
});
Aqui está o site:
http://sistemas.vilavelha.com.br/Newsletter/Ricardo/teste/index2.asp
Agradeceria qualquer ajuda!
Discussão (2)
Carregando comentários...