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:
29293 . Includes bug fixes not present in [ fat/zoom.js] [ fat-zoom ] , which is no
3030 longer being maintained
3131
32- ## Usage
32+ ## Installation
3333
34341 . Download the JS and CSS files using any of the following methods:
3535
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
3737 files to the `node_modules/zoom-vanilla.js/dist/` directory.
3838
3939 - Directly link to the files hosted on a CDN:
@@ -56,13 +56,22 @@ differences:
5656 <script src =" path/to/dist/zoom-vanilla.min.js" ></script >
5757 ```
5858
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:
6160
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"
6464 ```
6565
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+
6675## Browser support
6776
6877zoom-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