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

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -