How to Get the Size of the Viewport Using jQuery
Sometimes you will need to get the width and height of a window. To do that, you would use
jQuery(window).width();
jQuery(window).height();
This is useful on page load, if you wanted to check when a window was resized, you would use:
jQuery(window).resize(function() {
// Code here
});