10 examples of 'jquery window width' in JavaScript

Every line of 'jquery window width' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
84get innerWidth() { return this.width; }
338function getBrowserWidth () {
339 if (document.documentElement && document.documentElement.clientWidth) {
340 return document.documentElement.clientWidth;
341 } else if (window.innerWidth) {
342 return window.innerWidth;
343 } else if (document.body && document.body.clientWidth) {
344 return document.body.clientWidth;
345 } else if (document.body && document.body.offsetWidth) {
346 return document.body.offsetWidth;
347 }
348 return 0;
349}
94function _getWindowWidth() {
95 return window.innerWidth;
96}
162_get_width: function _get_width($el) {
163 return $el.width() + parseInt($el.css("padding-left")) + parseInt($el.css("margin-left")) + parseInt($el.css("padding-right")) + parseInt($el.css("margin-right"));
164},
33function setContentWidth() {
34 var lm = parseInt($("#slide-pane").parents(".col-md-3").css("marginLeft").replace("px", "")) + 51;
35 var w = $("#contain-slider").width() - ($("#slide-pane").outerWidth() + lm);
36 $(".tab-content").css('width', w + "px");
37}
12static outerWidth(el: Element): number {
13 var width = el.clientWidth;
14 var style = getComputedStyle(el);
15 width += parseInt(style.marginLeft) + parseInt(style.marginRight);
16 width += parseInt(style.borderLeftWidth) + parseInt(style.borderRightWidth);
17 return width;
18}
93function findWindowWidth()
94{
95 return window.innerWidth || document.documentElement.clientWidth;
96}
2function getBrowserWidth()
3{
4 if (window.innerWidth)
5 {
6 return window.innerWidth;
7 }
8 else if (document.documentElement && document.documentElement.clientWidth != 0)
9 {
10 return document.documentElement.clientWidth;
11 }
12 else if (document.body)
13 {
14 return document.body.clientWidth;
15 }
16 return 0;
17}
59set width(width: number | Promise) {
60 this.request(`${this.prefix}set_width`, [this, width]);
61}
463width() {
464 return this.el.offsetWidth || this.rect().width;
465}

Related snippets