ezoom.js is a jQuery plugin for simple Image with zoom effect.

Overview

ezoom.js

ezoom.js GitHub

ezoom.js is a jQuery plugin for simple Image with zoom effect.

This plugin in under development to support Next/Prev a gallery Images/SVG later.

You can find the repository at: https://github.com/leqnam/ezoom and demo here: https://leqnam.github.io/ezoom/demo/

Table of contents


Installation

Set up the HTML:

	<div id="imgDiv">
		<img src="images/may.png">
	</div>

and the javascript:

	ezoom.onInit($('#imgDiv img'), {
		onClose: function (result) {
			alert(result);
		}
	});

Usage

The plugin can be use with method onInit as two ways:

  • Expand an image HTML dom in a Zoom Modal to zoom in/out and rotate image. The element dom is passed on the query selector.
	ezoom.onInit(domElement, {
		onClose: function (result) {
			alert(result);
		}
	});
  • Expand an remote image with an URL in a Zoom Modal to zoom in/out adn rotate image, by passing the src option.
	const src = 'some image url';
	ezoom.onInit(domElement, {
		src: src,
		onClose: function (result) {
			alert(result);
		}
	});

Options

At the initialize, only src and hideControlBtn is available.

Option Value Description
domElement dom HTML DOM querySelector
src string An Image remote URL
hideControlBtn boolean Hide the Rotate Left/Right

Ex: To hide the Rotate Left/Right:
	ezoom.onInit($('#imgDiv img'), {
		hideControlBtn: true
	});

Methods

At the initialize, we only need the onInit to create the zoom-modal instance and listen on this instance.


Events

Event Description
onShow Fired when the Zoom modal is shown
onClose Fired when the Zoom modal is closed
onRotate Fired when rotating the image
onMoveStarted Fired when starting to move the image
onMovedCompleted Fired when finished moving by release the mouse
onMoving Fired while moving the image

The events can be used look like:
	ezoom.onInit(domElement, {
		onRotate: function(callback) {
			// some magic
		}
	});

Versions

  • v0.1.0
    1. Single image
    2. Add event listeners and callback


Acknowledgements

This plugin has been developed to use in my internal project to replace panzoom (https://github.com/anvaka/panzoom) - that has some issues with rotate.

An blog has been released:



License

Licensed under the MIT license.

Nam Le, 2021, [email protected],

http://nready.net

You might also like...

🔍 A view component for React Native with pinch to zoom and drag to pan functionality.

react-native-pan-pinch-view A view component for React Native with pinch to zoom and drag to pan functionality. 👋 Introduction Even though the demo s

Oct 6, 2022

Easy Pan and Zoom JS Library

EasyPZ Use this Javascript library to make your web visualization interactive via pan and zoom, for mobile and desktop! EasyPZ supports many interacti

Nov 21, 2022

A vanilla-js module for adding zoom-on-wheel and pan-on-drag behavior to inline SVG elements.

svg-pan-zoom-container A vanilla-js module for adding zoom-on-wheel and pan-on-drag behavior to inline SVG elements. No need to write scripts. Just ma

Dec 10, 2022

An open-source Typing-effect Library, That enables potential users to add a typing effect to mere DOM Elements.

Typing Effect Library An open-source Typing-effect Library I created. That enables potential users to add a typing effect to mere DOM Elements. Tool P

Oct 3, 2022

Flexible, powerful and modern library for creating the running horizontal blocks effect, also known as ticker or the «marquee effect».

Flexible, powerful and modern library for creating the running horizontal blocks effect, also known as ticker or the «marquee effect».

Cuberto Reeller Flexible, powerful and modern library for creating the running horizontal blocks effect, also known as ticker or the «marquee effect».

Jan 4, 2023

Simple JavaScript Library to add parallax image to background-image

Simple JavaScript Library to add parallax image to background-image

Backpax Simple JavaScript Library to add parallax image to background-image Install $ npm install backpax --save Demo Demo page is here Usage If you

Oct 12, 2022

jQuery plugin for adding some effect to text

jQuery plugin for adding some effect to text

jquery.textroll.js DEMO and examples jQuery plugin for adding some effect to text : DEMO Usage Simple $(".someClass").textroll(); With Options

Jan 15, 2022

A JavaScript plugin for creating a tickerboard effect. Plugin for React or vanilla JS.

ticker-board A JavaScript plugin for creating a tickerboard effect. See the Ticker Board page for more info. Importing it There are basically two ways

Aug 11, 2022

A jQuery plugin that lets you attach callbacks to useful image loading events.

waitForImages Copyright (c) 2011-2018 Alexander Dickson @alexdickson Licensed under the MIT licenses. http://alexanderdickson.com Donate! Overview Pro

Dec 28, 2022
Releases(0.1.0.0)
Simple jQuery plugin that will allow users to zoom in your images, perfect for product images and galleries.

Image Zoom (jQuery) Plugin Simple jQuery plugin that will allow users to zoom in your images, perfect for product images and galleries that is less th

Mario Duarte 8 Aug 3, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
My very own fantastic jQuery ZOOM plugin.

jQuery ZOOM plugin Coded by Robert Koteles, Senior Frontend Developer, 2015. This plugin was coded by me while worked as senior web developer/web mana

Robert Koteles 2 Oct 13, 2022
Dependency-free implementation of zoom.js (no jQuery or Bootstrap)

ZOOM.JS Repo status Nov 2020: Maintained, but bug fixes only. No new features currently, please. There may eventually be a new major version with new

Nishanth Shanmugham 1.3k Jan 3, 2023
This is a simple Image popup Jquery plugin. With a very simple configuration, you can show a popup on your webpage. By the way, this plugin works after page load.

Jquery-SingleImagePopup This is a simple Image popup Jquery plugin. With a very simple configuration, you can show a popup on your webpage. By the way

Rajan Karmaker 1 Aug 22, 2022
optimize image & upload file to cloud as image bed with tiny image automic.

Rush! 图片压缩 & 直传图床工具 这是一个兴趣使然的项目, 希望 Rush! 能让这个世界的网络资源浪费减少一点点 下载 Downloads 获取最新发行版 功能 Features 拖拽批量压缩图片, 支持格式 jpg/png/gif Drop to optimize, jpg/png/gif

{ Chao } 3 Nov 12, 2022
A simple and useful jquery plugin that allows you to create a Text Area Character Count Effect with limited warning.

jquery-character-counter A simple and useful jquery plugin that allows you to create a Text Area Character Count Effect with limited warning. #Demo Us

Abdoulie Kassama 0 Dec 28, 2020
A command-line tool to convert Project Zomboid map data into Deep Zoom format

pzmap2dzi pzmap2dzi is a command-line tool running on Windows to convert Project Zomboid map data into Deep Zoom format. Features Supports both python

Min Xiang 14 Dec 31, 2022