0.1.0 • Published 7 years ago

my-imgzoom v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

LazyLoad

a component to zoom images

Installation

npm i my-imgzoom -S

Usage

<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

ParameterTypeDefaultDescription
data-bigstringattribute to store big image src
smallcstringsmall image selector,used in document.querySelector