Ticket #8345 (closed bug: duplicate)
document width includes scrollbar in IE but not in FF
|Reported by:||albinohawk||Owned by:|
jQuery 1.5. Tested in IE 8.0.7600.16385 and Firefox 3.6.13
If the document is longer than the viewport (i.e. a vertical scrollbar is shown) then there is inconsistent behaviour between IE and Firefox.
In Firefox getting the document width using jQuery(document).width() will get the value without the scrollbar (expected behaviour)
In IE however getting the document width will return the width plus scrollbar width.
A test case which uses an 100% width element to show the discrepency can be found at http://jsfiddle.net/qzbzG/1/