npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

image-zoom-plugin

v1.0.0

Published

jQuery plugin to allow the zoom in of an image

Readme

Image Zoom (jQuery) Plugin

Main repo image

Simple jQuery plugin that will allow users to zoom in your images, perfect for product images and galleries that is less than 1.5kb.

Like this Plugin? Want to say thank you? Buy me a coffee! Too keep me going and improve this plugin.

Dependencies

How it works?

Allows users to click/tap to zoom-in on an image, pan around to inspect the details and click again to zoom-out.

Moving the focus out of the image will also reset the zoom.

Feel free to check this Demo to see it in action.

Why?

Why reinventing the wheel you may ask? I love to create and explore so why not sharing with others the things I create, hopefully will help a lot of younger developers.

How to use?

Just add the image-zoom.css to the head of your html file and the image-zoom.min.js just before the end of the body tag and after the jQuery script.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Your title</title>
	<link rel="stylesheet" href="css/style.css">
	<link rel="stylesheet" href="css/image-zoom.css">
</head>
<body>

	<!-- Your HTML content here -->

	<script src="js/jquery.min.js" type="text/javascript"></script>
	<script src="js/image-zoom.js" type="text/javascript"></script>
</body>
</html>

You will not need to modify any existing html code as can be added to any existing images on your document, but alternatively add some images to your page:

<section id="main">
	<div class="inner">
		<h1>Image Zoom jQuery Demo</h1>

		<div class="image-container">
			<img id="imageZoom" src="https://picsum.photos/1080/720" alt="A image to apply the ImageZoom plugin">
		</div>

	</div>
</section>

Lets add the zoom to the images

Add a new script at the end of your html just before the end of the body tag and add the zoom to your images.

<script type="text/javascript">
	$(document).ready(function(){
		$('#imageZoom').imageZoom();
	});
</script>

Options

You can pass the Zoom level as an option, by default this is set to 150%.

$('#imageZoom').imageZoom({zoom : 200});

Add to all images in a gallery

To add the zoom plugin to multiple images on a gallery you can use a standard loop to loop through the images and add the plugin to each of them.

The HTML:

	<div class="my-gallery">
		<img class="my-gallery-image" src="https://picsum.photos/1080/720" alt="A image to apply the ImageZoom plugin">
		<p>&nbsp;</p>
		<img class="my-gallery-image" src="https://picsum.photos/1920/1080" alt="A image to apply the ImageZoom plugin">
		<p>&nbsp;</p>
		<img class="my-gallery-image" src="https://picsum.photos/1440/1080" alt="A image to apply the ImageZoom plugin">
	</div>

And now the javascript:

	$('.my-gallery-image').each(function(){
		$(this).imageZoom();
	});