I want to resize my window height based on the screen size dynamically, so this (first image) won't happen:
Below are my HTML and jQuery - Is there a way to do it without adding the pageContent div around everything? And, if possible, in a more concise/ cleaner way. Thanks!
$(document).ready(function() {
var divH = $(".newRow").outerHeight();
var numDivs = $(".newRow").length;
var contentH = $(".pageContent").height(divH * numDivs + 10);
var footerH = $(".page-footer").height() + 12;
var headerH = $(".mainMenu").height();
$(window).resize(function() {
$(contentH).height($(window).height() - footerH - headerH);
});
$(window).trigger('resize');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="pageContent">
<div class="row cingapura newRow narrow simpleDoubleIcon">
<div class="rowOne faq">
<h3>Dúvidas frequentes </h3>
</div>
</div>
<div class="row cingapura newRow narrow simpleDoubleIcon">
<div class="rowOne turnOn">
<h3>Religar serviço</h3>
</div>
</div>
</div>
