How to get document height and width in pure javascript i.e without using jquery. I know about $(document).height() and $(document).width(), bu
$(document).height()
$(document).width()
You should use getBoundingClientRect as it usually works cross browser and gives you sub-pixel precision on the bounds rectangle.
getBoundingClientRect
elem.getBoundingClientRect()