Skip to content

Commit bf1067b

Browse files
committed
docs: update README
1 parent fe751e4 commit bf1067b

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66
Allows animating `scrollTop` and/or `scrollLeft` of an HTML element. Uses
77
`requestAnimationFrame` to provide smooth animations and returns a `Promise` to
8-
notify when the animation is completed. To ensure compatibility with older
9-
browsers, add polyfills for `requestAnimationFrame` and `Promise` as needed.
8+
notify when the animation is completed.
109

1110
### Installation
1211
Install with bower:
@@ -26,11 +25,11 @@ The pre-built files can be found in the `dist/` directory.
2625
wrapper so you can access it as:
2726

2827
```javascript
29-
var AnimatedScroll = require('dist/AnimatedScroll.min.js');
28+
var AnimatedScroll = require('animated-scroll');
3029
// or
31-
import AnimatedScroll from 'dist/AnimatedScroll.min.js';
30+
import AnimatedScroll from 'animated-scroll';
3231
// or
33-
define([ 'dist/AnimatedScroll.min.js' ], function (AnimatedScroll) {});
32+
define([ 'path/to/animated-scroll' ], function (AnimatedScroll) {});
3433
// or
3534
var AnimatedScroll = window.AnimatedScroll;
3635
```
@@ -50,10 +49,7 @@ scroll.left(100).then(function (newLeft) {
5049
console.log('#myElement\'s scrollLeft is now', newLeft);
5150
});
5251

53-
scroll.to({
54-
left: 100,
55-
top: 100
56-
}).then(function (coords) {
52+
scroll.to({ left: 100, top: 100 }).then(function (coords) {
5753
console.log('#myElement\'s scrollTop is now', coords.top);
5854
console.log('#myElement\'s scrollLeft is now', coords.left);
5955
});

0 commit comments

Comments
 (0)