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()
How to find out the document width and height very easily?
in HTML
in javascript
var c=document.querySelector('#hidden_placer'); var r=c.getBoundingClientRect(); r.right=document width r.bottom=document height`
You may update this on every window resize event, if needed.