0.1.0 • Published 7 years ago
my-imgzoom v0.1.0
LazyLoad
a component to zoom images
Installation
npm i my-imgzoom -SUsage
<div class="smallc">
<img id="smallimg" src="./images/userimg.jpg" alt="" data-big="./images/userimg-big.jpg" class="smallimg">
<div class="j-smallmask smallmask"></div>
</div>import {ImgZoom} from 'my-imgzoom';
new ImgZoom({
smallc:'.smallc'
});Params
| Parameter | Type | Default | Description |
|---|---|---|---|
| data-big | string | attribute to store big image src | |
| smallc | string | small image selector,used in document.querySelector |
0.1.0
7 years ago