a component to zoom images
npm i my-imgzoom -S
<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'
});
Parameter | Type | Default | Description |
---|---|---|---|
data-big | string |
attribute to store big image src | |
smallc | string |
small image selector,used in document.querySelector |