I heard it offset.width , document.documentElement.clientWidth and window.innerWidth
I am wondering which projects I cannot use jQuery, which solution should I use?
function windowWidth() { var docElemProp = window.document.documentElement.clientWidth, body = window.document.body; return window.document.compatMode === "CSS1Compat" && docElemProp || body && body.clientWidth || docElemProp; }
Taken (and slightly modified from jQuery source:
https://github.com/jquery/jquery/blob/master/src/dimensions.js#L42
Watch for yourself. He uses different things. document.documentElement.clientWidth among them.
It can also use document.body.clientWidth
it
window.innerWidth
The above property returns the same value as $( window ).width() .
$( window ).width()
Live demo: http://jsfiddle.net/Jukh9/1/show/
However, IE8 does not implement this property ...
Source: https://habr.com/ru/post/1382412/More articles:Java - KeyListener thread causes a simultaneous modification. Decision? - javaget selected jQuery id text code - jqueryhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1382409/is-it-possible-to-create-ostream-object-which-outputs-to-multiple-destinations&usg=ALkJrhhKs-IBk4CNZqD-mu43Ff8K5G18YgEmbedding the Groovy Grails service in a Java class - javaCreating instances of open inner classes of common classes - javaPixels cropped with multiple text shadows and negative line spacing in Webkit - cssJQuery Modal Forms with Struts 1.3 - jqueryObjective-C: Can't initialize UIViewController in case of switch? - objective-cError handling HTTP Chunked response - javajQuery modal form AJAX to Struts 1.3 Action - jqueryAll Articles