Skip to content

Commit 4852e48

Browse files
committed
add events to readme
1 parent 20b92ef commit 4852e48

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,22 @@ An experimental animated ribbon which reveals a curtain of additional content.
44

55
Curious about how this looks in action? [Check out the demo page](http://lab.hakim.se/forkit-js/).
66

7+
## Events
8+
9+
Open/close events are dispatched from the main ```.forkit``` element:
10+
11+
```javascript
12+
document.querySelector( '.forkit' ).addEventListener( 'forkit-open', function() {
13+
// fired when the curtain is pulled down
14+
} );
15+
16+
document.querySelector( '.forkit' ).addEventListener( 'forkit-close', function() {
17+
// fired when the curtain retracts
18+
} );
19+
```
20+
721
# License
822

923
MIT licensed
1024

11-
Copyright (C) 2012 Hakim El Hattab, http://hakim.se
25+
Copyright (C) 2012 Hakim El Hattab, http://hakim.se

0 commit comments

Comments
 (0)