Question

I need to get the body element height and width, when i resize the browser windows

Please help me to solve this problem using JQuery

Was it helpful?

Solution

Use the resize event on the window object:

$(window).resize(function(){
  var width = $(document).width(), // or $(window).width()
      height = $(document).height(); // or $(window).height()
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top