|
6 | 6 | [![NPM downloads][npm-downloads-image]][npm-url]
|
7 | 7 | [![MIT License][license-image]][license-url]
|
8 | 8 |
|
| 9 | +[travis-image]: https://img.shields.io/travis/biancojs/viewport.svg?style=flat-square |
9 | 10 |
|
10 |
| -[travis-image]:https://img.shields.io/travis/biancojs/viewport.svg?style=flat-square |
11 |
| -[travis-url]:https://travis-ci.org/biancojs/viewport |
| 11 | +[travis-url]: https://travis-ci.org/biancojs/viewport |
12 | 12 |
|
13 |
| -[license-image]:http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square |
14 |
| -[license-url]:LICENSE.txt |
| 13 | +[license-image]: http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square |
15 | 14 |
|
16 |
| -[npm-version-image]:http://img.shields.io/npm/v/bianco.viewport.svg?style=flat-square |
17 |
| -[npm-downloads-image]:http://img.shields.io/npm/dm/bianco.viewport.svg?style=flat-square |
18 |
| -[npm-url]:https://npmjs.org/package/bianco.viewport |
| 15 | +[license-url]: LICENSE.txt |
| 16 | + |
| 17 | +[npm-version-image]: http://img.shields.io/npm/v/bianco.viewport.svg?style=flat-square |
| 18 | + |
| 19 | +[npm-downloads-image]: http://img.shields.io/npm/dm/bianco.viewport.svg?style=flat-square |
| 20 | + |
| 21 | +[npm-url]: https://npmjs.org/package/bianco.viewport |
19 | 22 |
|
20 | 23 | ## API
|
21 | 24 |
|
| 25 | +<!-- Generated by documentation.js. Update this documentation by updating the source code. --> |
| 26 | + |
| 27 | +### scrollbarWidth |
| 28 | + |
| 29 | +Return the size of the scrollbar that depends on the browser or device used on the client |
| 30 | + |
| 31 | +Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the browser scrollbar width |
| 32 | + |
| 33 | +### documentHeight |
| 34 | + |
| 35 | +Get the height of the whole page |
| 36 | + |
| 37 | +Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** height in px of the document |
| 38 | + |
| 39 | +### documentWidth |
| 40 | + |
| 41 | +Get the width of the whole page |
| 42 | + |
| 43 | +Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** width in px of the document |
| 44 | + |
| 45 | +### scrollTop |
| 46 | + |
| 47 | +Return amount of px scrolled from the top of the document |
| 48 | + |
| 49 | +Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** scroll top value in px |
| 50 | + |
| 51 | +### scrollLeft |
| 52 | + |
| 53 | +Return amount of px scrolled from the top of the document |
| 54 | + |
| 55 | +Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** scroll left value in px |
| 56 | + |
| 57 | +### elementOffsetTop |
| 58 | + |
| 59 | +Get the offset top of any DOM element |
| 60 | + |
| 61 | +**Parameters** |
| 62 | + |
| 63 | +- `el` **[HTMLElement](https://developer.mozilla.org/en-US/docs/Web/HTML/Element)** the element we need to check |
| 64 | + |
| 65 | +Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the element y position in px |
0 commit comments