my-imgzoom
v0.1.0
Published
image zoom
Readme
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
