Skip to content

Commit 3730715

Browse files
committed
Add documentation
1 parent e62463e commit 3730715

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
![](rollerskate.png)
2+
3+
Yet another accordion library.
4+
5+
```html
6+
<ul data-accordion>
7+
<li data-accordion-item> <!-- index 0 -->
8+
<div data-accordion-item-body></div>
9+
<li>
10+
<li data-accordion-item> <!-- index 1 and so on! -->
11+
<div data-accordion-item-body></div>
12+
<li>
13+
</ul>
14+
```
15+
16+
```js
17+
const Rollerskate = require('rollerskate');
18+
const rollerskate = new Rollerskate(window);
19+
20+
rollerskate.expandAll();
21+
rollerskate.collapseAll();
22+
rollerskate.item(0).expand();
23+
rollerskate.item(0).collapse();
24+
```

rollerskate.png

5.49 KB
Loading

0 commit comments

Comments
 (0)