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
(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
Post a Comment