Automatically assign the height of a website

Automatically assign the height of a website

Heyllo everybody,
could you please help me with the currently programmcode, to get automatically the height of my homepeage? I don't need to scroll the website.
Thanks.

$(document).ready(sizeContent);
$(window).resize(sizeContent);
function sizeContent() {
var newHeight = $("html").height() - $("#header").height() - $("#footer").height() + "px";
$("#content").css("height", newHeight);
}