How to get Body element height dynamically using JQuery
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
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