Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
blade254353074 committed Apr 1, 2017
1 parent b87fe05 commit 6b97dde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ import scrollToElement from 'scrollto-element'
```javascript
import scrollToElement from 'scrollto-element'

scrollToElement('#J_ScrollToMe')
scrollToElement('#J_ScrollToMe', 300)
// or
scrollToElement(document.querySelector('#foobar'))
scrollToElement(element, 300)

// advanced
scrollToElement({
selector: '#J_ScrollToMe',
element: document.querySelector('#foobar'),
bezier: [0.19, 1, 0.22, 1],
duration: 3000,
then () {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "scrollto-element",
"version": "1.0.0",
"description": "A simple animated scroll to element function.",
"main": "dist/scrollto-element.js",
"main": "dist/scrollto-element.min.js",
"module": "src/scrollto-element.js",
"scripts": {
"clean": "rimraf dist/*",
Expand Down

0 comments on commit 6b97dde

Please sign in to comment.