9 examples of 'jquery scrollheight' in JavaScript

Every line of 'jquery scrollheight' 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
159function getScrollHeight(elementID) {
160 var height = 0;
161 var children = d3.select("#" + _this.table_name + "Table tbody").node().children;
162 for (var i = 1; i < children.length; i++) { // the first child is always the header
163 if (children[i].id === elementID) {
164 return height;
165 }
166 height += children[i].scrollHeight;
167 }
168 return height;
169}
57function getScrollHeight() {
58 let scrollHeight = 0,
59 bodyScrollHeight = 0,
60 documentScrollHeight = 0;
61
62 if (document.body) {
63 bodyScrollHeight = document.body.scrollHeight;
64 }
65
66 if (document.documentElement) {
67 documentScrollHeight = document.documentElement.scrollHeight;
68 }
69 scrollHeight =
70 bodyScrollHeight - documentScrollHeight > 0
71 ? bodyScrollHeight
72 : documentScrollHeight;
73 return scrollHeight;
74}
168_proto._getScrollHeight = function _getScrollHeight() {
169 return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
170};
614VirtualRepeat.prototype._calcScrollHeight = function _calcScrollHeight(element) {
615 var height = void 0;
616 height = element.getBoundingClientRect().height;
617 height -= getStyleValue(element, 'borderTopWidth');
618 height -= getStyleValue(element, 'borderBottomWidth');
619 return height;
620};
190value: function _getScrollHeight() {
191 return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
192}
320function jqLiteScrollTop(element, value) {
321 var win = window;
322
323 // get
324 if (value === undefined) {
325 if (element === win) {
326 var docEl = document.documentElement;
327 return (win.pageYOffset || docEl.scrollTop) - (docEl.clientTop || 0);
328 } else {
329 return element.scrollTop;
330 }
331 }
332
333 // set
334 if (element === win) win.scrollTo(jqLiteScrollLeft(win), value);else element.scrollTop = value;
335}
56_getScrollHeight (el) { // 滚动内容的高度
57 return el.scrollHeight
58}
101getScrollHeight() {
102 return this.scrollBars.getScrollHeight();
103}
57getScrollY(): Promise {
58 return this.webdriver.executeScript(() => window.pageYOffset);
59}

Related snippets