My very own fantastic jQuery ZOOM plugin.

Overview

jQuery ZOOM plugin

jQuery plugin

Coded by Robert Koteles, Senior Frontend Developer, 2015. This plugin was coded by me while worked as senior web developer/web manager at Black Sun Plc., London.

Demo

Remarks

  1. For proper work of this plugin please use the recommended CSS definitions of parent/children elements

GIT Hub

Link: https://github.com/kotelesroberto/zoom.jquery

Clone

Clone this repo to your local machine using

https://github.com/kotelesroberto/zoom.jquery.git

Installation and usage

  1. Simple add the code to header of the HTML page first.
<script type="text/javascript" src="zoom.jquery.js"></script>
  1. Init the plugin on elements
let zoomMap = $('.maps-container-inner').ZoomArea({
        zoomLevel: 1,
        minZoomLevel: 1,
        maxZoomLevel: 15,
        parentOverflow: 'auto',
        exceptionsZoom: ['marker-all'],
        hideWhileAnimate: ['map-area', 'marker-all'],
        externalIncrease: '.map-control-zoomin',
        externalDecrease: '.map-control-zoomout',
        virtualScrollbars: false,
        usedAnimateMethod: 'jquery'
    });

Parameters

  • zoomLevel : 1, Level of initial zoom. If we wanna start the plugin with double size zoom value, easy add 2 as value. Later here will be stored the actual zoom level.
  • minZoomLevel: 0.25, limitation of zooming
  • maxZoomLevel: 3, limitation of zooming
  • defaultUniqueValue, unique zoom external option value
  • defaultUniqueClass, unique zoom external option classname
  • elementClass : '', If it's empty, the system generates automatically the class name for identification. Important to have when plugin is called multiplicative and at zooming an element the exceptional elements contained it will be effected by the plugin only.
  • enableDrag : false, TRUE or FALSE. If true, user can drag the zoomed element.
  • enableBringToFront: false, TRUE or FALSE. If true, after click the element will be appearing on the front of any element (z-index).
  • left : null, Left offset value of the zoomed element in the parent container. If it's NULL, will be centered horizontally in the beginning.
  • top : null, Top offset value of the zoomed element in the parent container. If it's NULL, will be centered vertically in the beginning.
  • width : null, Width of the zoomed element. Plugin stores this value in this variable.
  • height : null, Height of the zoomed element. Plugin stores this value in this variable.
  • parentOverflow : visible, Control the overflow for parent element. visible | hidden | scroll | auto | inherit
  • mouseSensibleZoom : true / false, If it's on, zoom center is the position of the mouse
  • usedAnimateMethod: jquery / css / none, if it's true, the script uses JQuery animate() function to set the left/top/scale values
  • virtualScrollbars: true or false. If true, a virtually created scrollbar will be visible to set the position of the object with it (when overfloats the parent container)
  • hideWhileAnimate: classes to hide while animating, than again showing up
  • animateTime: duration of the JQuery animation (valid for objects when hideWhileAnimate or usedAnimateMethod are set on)
  • parent_left : null, Left offset value of the zoomed element's parent. Plugin stores this value in this variable. Calculated once in INIT(). But resizing the window the plugin runs a re-configuration.
  • parent_top : null, Top offset value of the zoomed element's parent. Plugin stores this value in this variable. Calculated once in INIT(). But resizing the window the plugin runs a re-configuration.
  • parent_width : null, Width of the zoomed element's parent. Plugin stores this value in this variable. Calculated once in INIT(). But resizing the window the plugin runs a re-configuration.
  • parent_height : null, Height of the zoomed element's parent. Plugin stores this value in this variable. Calculated once in INIT(). But resizing the window the plugin runs a re-configuration.
  • exceptionsZoom : [ 'label', 'indicator', 'popup' ], Classes for elements to ignore from zoom in the actual container.
  • externalIncrease : '#zoom-increase', External control (with id or class name) for increase the zoom level
  • externalDecrease : '#zoom-decrease', External control (with id or class name) for decrease the zoom level
  • externalZoomLevel : '#zoom-level', External control (with id or class name) for change the zoom level with a SELECT html element
  • onBeforeLoad : null, Function, runs before the PLUGIN inits.
  • onAfterLoad : null Function, runs after the PLUGIN is done.
  • onBeforeZoom : null Function, runs before the ZOOM FUNCTION runs
  • onAfterZoom : null Function, runs after the ZOOM FUNCTION is done.
  • onBeforeDrag : null Function, runs before the element begin DRAGGED
  • onAfterDrag : null Function, runs after the drag is done and element is RELEASED (AFTER DRAGGING).

Licence

You might also like...

This is a boilerplate for creating your own languages for various use cases. You can even create your own programming language from scratch!

Bootstrap compiler This is a bootstrap compiler that can be used to compile to compiler written in the target language. You can write a compiler in th

Nov 14, 2022

A command-line tool to convert Project Zomboid map data into Deep Zoom format

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

Dec 31, 2022

🔍 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

jQuery based scrolling Bar, for PC and Smartphones (touch events). It is modern slim, easy to integrate, easy to use. Tested on Firefox/Chrome/Maxthon/iPhone/Android. Very light 7ko min.js and 1Ko min.css.

Nice-Scrollbar Responsive jQuery based scrolling Bar, for PC and Smartphones (touch events). It is modern slim, easy to integrate, easy to use. Tested

Jan 18, 2022

Show More Less - jQuery - Very useful tiny tool

myOwnLineShowMoreLess Show More Less - jQuery - Very useful tiny tool. Demo Getting Started This is simple plugin developed using jQuery. Prerequisite

Dec 29, 2020

Create your own password generator using jQuery, Vanilla JS, and SASS.

Password Generator Create your own password generator using jQuery, Vanilla JS, and SASS. I have been working with JS for my last few projects so I th

Jul 12, 2021

ToastmeJS is a very simple, flexible and light weigth plugin that shows Notifications and modal Dialogs on your website.

⚡ ToastmeJS ToastmeJS is a very simple, flexible and light weigth plugin that shows Notifications and modal Dialogs on your website. Customize positio

Jun 20, 2022
Comments
  • Marker positions on map / wrong scale?

    Marker positions on map / wrong scale?

    Hi Roberto, sorry to bother you with this issue - I don't think it is a bug but rather my "not understanding" of your tool...

    I successfully implemented the zoom jquery for a widget (example see below), and positioned my markers with "pixels" rather than "percent" as in your sample. This did work well(!), but now I have to use a bigger view on the map. All markers are still on their relative position according to the smaller map. you can see it live here: http://development.hosting-schultz.ch/awb/ So where is the "relative" position for markers on the map image handled?

    kind regars Ruediger Schultz

    opened by schultz-it-solutions 1
Owner
Robert Koteles
👆👆👆 Experienced Senior Frontend Web Developer. Because Jimi Hendrix is the king my bitbucket url is: https://bitbucket.org/hendrixisking
Robert Koteles
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
ezoom.js is a jQuery plugin for simple Image with zoom effect.

ezoom.js 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 lat

Nam Le 3 Sep 3, 2022
Remix enables you to build fantastic user experiences for the web and feel happy with the code that got you there. In this workshop, we'll look at some more advanced use cases when building Remix applications.

?? Advanced Remix Workshop Remix enables you to build fantastic user experiences for the web and feel happy with the code that got you there. In this

Frontend Masters 167 Dec 9, 2022
Remix enables you to build fantastic user experiences for the web and feel happy with the code that got you there. Get a jumpstart on Remix with this workshop.

?? Remix Fundamentals Build Better websites with Remix Remix enables you to build fantastic user experiences for the web and feel happy with the code

Frontend Masters 204 Dec 25, 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
An exercise in building a very minimal (and very stupid) in-memory SQL-like database for educational purposes.

Stupid Database This is an exercise in building a very minimal (and very stupid) in-memory SQL-like database for educational purposes. None of this co

Fabio Akita 196 Dec 20, 2022
A Very Good Documentation Site created by the Very Good Ventures Team 🦄

Very Good Docs Site Developed with ?? by Very Good Ventures ?? A Very Good Docs Site created by the Very Good Ventures Team. Generated by the Very Goo

Very Good Open Source 8 Nov 2, 2022
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
This React-Based WebPage allows the client/user system to create their own blog, where users can publish their own opinions.

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

Gauri Bhand 4 Jul 28, 2022
zkPoB is a mobile compatible tool that lets anyone prove they own a Bufficorn (or any NFT) without revealing which Buffi they own or the address they are verifying themselves with

zkPoB is a mobile compatible tool that lets anyone prove they own a Bufficorn (or any NFT) without revealing which Buffi they own or the address they are verifying themselves with

Marto.eth 10 Aug 25, 2022