scroll-down
Advanced tools
Comparing version 1.0.0 to 2.0.0
// scroll an element to the bottom | ||
exports.now = function(element) { | ||
module.exports = function(element) { | ||
element.scrollTop(element[0].scrollHeight); | ||
@@ -5,0 +5,0 @@ return false; |
{ | ||
"name": "scroll-down", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Scroll down within an element", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# scroll-down | ||
Scroll down within an element | ||
Scroll to the bottom of an element. We use it | ||
to scroll a textarea to the bottom every time we add | ||
content to it. | ||
### Usage | ||
```bash | ||
npm install --save scroll-down | ||
``` | ||
```javascript | ||
var scrollDown = require('./index.js'); | ||
// scroll in element to the bottom | ||
scrollDown(element); | ||
``` | ||
@@ -10,4 +10,4 @@ var scrollDown = require('./index.js'); | ||
scrollDown.now(element); | ||
scrollDown(element); | ||
console.log('Done testing. All good'); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3074
18