Skip to content

Commit 5d0d934

Browse files
committed
Update README.md
1 parent 3fdacfd commit 5d0d934

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Some demos. Scroll down slowly.
3030

3131
**The tests are both `tests` and `examples`**
3232

33+
See reference is at the end
34+
3335
#### Examples/Tests
3436
| Example / Test name | Functionality |
3537
|------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
@@ -52,4 +54,20 @@ Some demos. Scroll down slowly.
5254
[3]: https://github.com/princemaple/scroll-trigger/tree/master/test
5355
[4]: http://plnkr.co/edit/JWFntSUoMewTj9hULfD1?p=preview
5456

55-
Some real usage instructions will be added later
57+
### Reference
58+
59+
```html
60+
<div scroll-trigger="doSomething()"></div>
61+
```
62+
63+
#### Available Attributes
64+
- `trigger-run`: runs the trigger when the page is loaded regardless of the relative position of the element
65+
- `trigger-at-end`: instead of triggering when the top of the element enters the screen, trigger at the end
66+
- `trigger-persist`: do not remove the trigger (event listener) after it has been triggered
67+
- `trigger-container`: instead of listening on `window`, listen on a specific container
68+
- `trigger-active`: conditionally check screen position
69+
- `scroll-trigger-id`: manually assign a unique identifier
70+
71+
#### Available configuration
72+
- `offset`: gives you adjustable space
73+
- `interval`: gives you adjustable timing

0 commit comments

Comments
 (0)