Jquery browser dimensions

To show the current height and width of the browser, whack the following into your Jquery commands

$(“#windowWidth”).text($(this).width());
$(“#windowHeight”).text($(this).height());

$(window).resize(function() {
$(“#windowWidth”).text($(this).width());
$(“#windowHeight”).text($(this).height());
});

 

Then put a couple of elements on your page to display them

Width: <span id=”windowWidth”></span>

Height: <span id=”windowHeight”></span>