Member-only story

ZoomIt.js — jQuery plugin that adds simple, highly configurable dynamic zoom functionality for your images

YvonneDev
2 min readMay 14, 2019

--

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…

--

--

YvonneDev
YvonneDev

Written by YvonneDev

❤️Front-end Web Development self-taught *share what I learned*

No responses yet