How can I determine the height of a horizontal scrollbar, or the width of a vertical one, in JavaScript?
Already coded in my library so here it is:
var vScrollWidth = window.screen.width - window.document.documentElement.clientWidth;
I should mention that jQuery $(window).width() can also be used instead of window.document.documentElement.clientWidth.
It doesn't work if you open developer tools in firefox on the right but it overcomes it if the devs window is opened at bottom!
window.screen is supported quirksmode.org!
Have fun!