Javascript: simply cannot get the actual width of the document (jsfiddle provided) -


edited:

i want actual of document js.

i created fiddle know 1160px width, works in google chrome, not in ie:

document.body.clientwidth+document.body.scrollleft 

http://jsfiddle.net/w36fg/18/

(just scroll fiddle , hover div);

any ideas?

window.innerwidth, window.innerheight in browsers.

or ie specific,

document.documentelement.offsetwidth, document.documentelement.offsetheight

or document.documentelement.clientwidth

as per comment,

window.innerwidth || document.documentelement.clientwidth should work.

and here's wanted (took while there, hey, got it)

document.body.scrollwidth


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -