Member-only story
ZoomIt.js — jQuery plugin that adds simple, highly configurable dynamic zoom functionality for your images
ZoomIt.js is a jQuery plugin that could magnify the image dynamically.
GitHub here
Step1:
link jquery
zoomIt.css and zoomIt.js
<link rel="stylesheet" media="all" href="dist/styles/zoomit.css" /><script src="https://code.jquery.com/jquery-3.1.1.min.js"></script><script src="dist/scripts/jquery.zoomit.min.js"></script>
Step2:
HTML
image id for selecting in script
src links small picture
data-zoomed links big picture
Step3:
js
Initialize the plugin
Options
- img (jQuery Object) — The “unzoomed” image object that is intended to zoom
- src (String | Function) — May either be a string or a function that returns a string of the path to the large image to be zoomed.
- class (Object) — Object containing different class names used by the plugin
- container (String: Default
zoomit-container
) - Class…