Determining if your browser has a vertical scrollbar showing

In javascript, I needed to know if a browser was currently showing a scrollbar. This was fairly simple, but just thought I’d write it down.

window.innerHeight < document.documentElement.scrollHeight

Leave a Reply

Your email address will not be published. Required fields are marked *