File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,11 @@ differences:
29
29
3 . Includes bug fixes not present in [ fat/zoom.js] [ fat-zoom ] , which is no
30
30
longer being maintained
31
31
32
- ## Usage
32
+ ## Installation
33
33
34
34
1 . Download the JS and CSS files using any of the following methods:
35
35
36
- - npm: `npm i -D zoom-vanilla.js`. This will download the the necessary
36
+ - npm: ` npm i zoom-vanilla.js ` . This will download the the necessary
37
37
files to the `node_modules/zoom-vanilla.js/dist/` directory.
38
38
39
39
- Directly link to the files hosted on a CDN:
@@ -56,13 +56,22 @@ differences:
56
56
<script src =" path/to/dist/zoom-vanilla.min.js" ></script >
57
57
```
58
58
59
- 3. Add a `data-action="zoom"` attribute to the images you want to make
60
- zoomable:
59
+ You can also `import` them if you're using webpack:
61
60
62
- ```html
63
- <img src =" img/blog_post_featured.png" data-action =" zoom" >
61
+ ```javascript
62
+ import "zoom-vanilla.js/dist/zoom.css"
63
+ import "zoom-vanilla.js/dist/zoom-vanilla.min.js"
64
64
```
65
65
66
+ ## Usage
67
+
68
+ Add a `data-action="zoom"` attribute to the images you want to make
69
+ zoomable:
70
+
71
+ ```html
72
+ <img src =" img/blog_post_featured.png" data-action =" zoom" >
73
+ ```
74
+
66
75
## Browser support
67
76
68
77
zoom-vanilla.js should (in theory) work in all modern browsers. If not, create
You can’t perform that action at this time.
0 commit comments