jquery Get scroll bar height
Get the height of the browser display area:
$ (window). Height ();
Get the width of the browser display area:
$ (window). width ();
To get the document height of a page:
$ (document). Height ();
Gets the document width of the page: $ (document). width ();
Gets the vertical height of the scroll bar to the top:
$ (document). ScrollTop ();
Gets the vertical width of the scroll bar to the left:
$ (document). ScrollLeft ();
Calculate element position and offset:
$ (ID). offset ();
The offset method is a useful way to return the offset information for the first element in the wrapper set. By default, the offset information for the body is relative. The result contains top and left two properties.
Offset (options, results)
OPTIONS.RELATIVETO Specifies a relative meter
The ancestor element that calculates the offset position. This element should be relative or absolute positioned. The omission is relative to the body.
Whether the Options.scroll
Scroll bar calculation, default True
Options.padding whether the padding is counted, the default false
Options.margin
Whether margin is counted, default true
Options.border whether the border is counted, default true