zizoom
Lightweight jquery plugin magnify image
Usage
-
Include jQuery:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
-
Include ZoomToo code:
<script src="dist/jquery.zizoom.js"></script>
-
Markup the container element:
<div class="photo" data-zoom="../assets/img/big.jpg" > <img src="../assets/img/small.jpg" alt="Photo must be zoomed" > </div>
-
Call the plugin:
$(".photo").zizoom();
Options
-
Activate Method:
Select activation method.
activate : 'hover', 'click'
hover: on mouse over (default) click: onmouse click
-
Data name for zoomed img:
Select activation method.
dataElement : 'zoom'
zoom (default) - retrieve form data-zoom
-
Icon:
Font icon reference. Used if you select 'click' option on activated method
zoomicon : 'fa fa-search'
'fa fa-search' (default). As default use font-awersome search icon
-
Icon color:
Font icon reference. Used if you select 'click' option on activated method
zoomcolor : '#fff'
'#fff' (default). color Hex