$(window).height();
$(window).width();
More info
Using jQuery is not essential for getting those values, however. Use
document.documentElement.clientHeight;
document.documentElement.clientWidth;
to get sizes excluding scrollbars, or
window.innerHeight;
window.innerWidth;
to get the whole viewport, including scrollbars.
document.documentElement.clientHeight <= window.innerHeight; // is always true