Properties document.body.clientHeight
and document.body.clientWidth
return different values on IE7, IE8 and Firefox:
IE 8:
Element.clientWidth
& Element.clientHeight
return the height/width of that element's content in addition any applicable padding.
The jQuery implementation of these are: $(target).outerWidth() & $(target).outerHeight()
.clientWidth
& .clientHeight
are included in the CSSOM View Module specification which is currently in the working draft stage. While modern browsers have a consistent implementation of this specification, to insure consistent performance across legacy platforms, the jQuery implementation should still be used.
Additional information: