How To Get Width Height Of Body And Whole Window By jQuery

Hi Friends, Today I am going to write about how to get height and width of document body and heoght and width of whole window by jQuery. Yesterday I was trying to find height and width of body and whole document in one jquery image gallery, So I searched for it alot and finally i found that how can we can get height and width of body and whole document by jquery, I explained below that how can get height and width of body and whole document by jquery.

$(window).width(); => It returns width of the body
$(document).width(); => It returns width of the whole window
$(window).height(); => It returns height of the body
$(document).height(); => It returns height of the whole window

So it is simple and clear that how can we get height and width of body and whole document by jquery. if you have any question regarding this, you can post in comment.

Use these 20 free cheatsheets to save more time in website design.

Subscribe to PHP Freelancer

Enter your email address: