Skip to content

Commit 333361c

Browse files
authored
Merge pull request #2 from slackerzz/readme
Create README.md
2 parents 36756c9 + bbd7c4c commit 333361c

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

README.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# slickjs
2+
This module lets you use [Slick](https://github.com/kenwheeler/slick/) with Magento 2 throught requirejs
3+
4+
## Installation
5+
```
6+
composer require msp/owlcarousel2
7+
bin/magento setup:upgrade
8+
```
9+
10+
## Usage
11+
### Initialization
12+
You can init the slider with `data-mage-init`:
13+
```
14+
<div class="your-class" data-mage-init='{
15+
"slick": {
16+
...
17+
"autoplay" : true,
18+
...
19+
}
20+
}'>
21+
<div>your content</div>
22+
<div>your content</div>
23+
<div>your content</div>
24+
</div>
25+
```
26+
or with a `<script type="text/x-magento-init">`:
27+
```
28+
<div id="your-id" class="your-class">
29+
<div>your content</div>
30+
<div>your content</div>
31+
<div>your content</div>
32+
</div>
33+
<script type="text/x-magento-init">
34+
{
35+
"#your-id": {
36+
"slick": {
37+
...
38+
"autoplay" : true,
39+
...
40+
}
41+
}
42+
}
43+
</script>
44+
45+
```

0 commit comments

Comments
 (0)