All Projects â†’ ironexdev â†’ zoom

ironexdev / zoom

Licence: Apache-2.0 License
Lightweight (8 Kb) ES5 javascript plugin without any dependencies, compatible with desktop and mobile devices.

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to zoom

Darkmode Js
DarkModeJS helps you to auto detect user's time and switch theme to darkside
Stars: ✭ 328 (+1212%)
Mutual labels:  lightweight, vanilla-javascript
Medium Zoom
🔎🖼 A JavaScript library for zooming images like Medium
Stars: ✭ 2,799 (+11096%)
Mutual labels:  vanilla-javascript, zoom
jpopup
Simple lightweight (<2kB) javascript popup modal plugin
Stars: ✭ 27 (+8%)
Mutual labels:  lightweight, vanilla-javascript
Autocomplete.js
Simple autocomplete pure vanilla Javascript library.
Stars: ✭ 3,428 (+13612%)
Mutual labels:  lightweight, vanilla-javascript
Beedle
A tiny library inspired by Redux & Vuex to help you manage state in your JavaScript apps
Stars: ✭ 329 (+1216%)
Mutual labels:  lightweight, vanilla-javascript
Splide
Splide is a lightweight, powerful and flexible slider and carousel, written in pure JavaScript without any dependencies.
Stars: ✭ 786 (+3044%)
Mutual labels:  lightweight, vanilla-javascript
LC-switch
Superlight vanilla javascript plugin improving forms look and functionality
Stars: ✭ 31 (+24%)
Mutual labels:  lightweight, vanilla-javascript
crawley
Crawley the Telegram Beholder
Stars: ✭ 24 (-4%)
Mutual labels:  lightweight
StringDB
StringDB is a modular, key/value pair archival DB designed to consume *tiny* amounts of ram & produce *tiny* databases.
Stars: ✭ 56 (+124%)
Mutual labels:  lightweight
lightue
A lightweight and simple model-view framework inspired by Vue.js
Stars: ✭ 13 (-48%)
Mutual labels:  lightweight
macos-receiver
A MacOS TabBar (StatusBar) application that securely receives one-time passwords (OTPs) that you tapped in Raivo for iOS.
Stars: ✭ 44 (+76%)
Mutual labels:  lightweight
vanillajs-hello
Start a VanillaJS website using WebPack in just 30 seconds: HTML,CSS,Babel,SASS,Bootstrap,Prettier,Gitpod
Stars: ✭ 24 (-4%)
Mutual labels:  vanilla-javascript
Perspective
🖼Parallax scrolling effect. And more.
Stars: ✭ 80 (+220%)
Mutual labels:  vanilla-javascript
Synapses
A group of neural-network libraries for functional and mainstream languages
Stars: ✭ 63 (+152%)
Mutual labels:  lightweight
js-treeview
TreeView implemented with vanilla JavaScript
Stars: ✭ 51 (+104%)
Mutual labels:  vanilla-javascript
spider-covid-19-viz-3d
Speedy access to the latest, local COVID-19 data with a familiar interface: the Globe
Stars: ✭ 19 (-24%)
Mutual labels:  vanilla-javascript
rails5-docker-alpine
Lightweight Docker development environment for Rails using Alpine Linux
Stars: ✭ 71 (+184%)
Mutual labels:  lightweight
tdme2
TDME2 - ThreeDeeMiniEngine2 is a lightweight, multi-platform 3D engine including tools suited for 3D game/application development using C++
Stars: ✭ 86 (+244%)
Mutual labels:  lightweight
shoot game
🎮 It is a game using HTML5 Canvas and Vanilla JavaScript.
Stars: ✭ 35 (+40%)
Mutual labels:  vanilla-javascript
sabotage
a radical and experimental distribution based on musl libc and busybox
Stars: ✭ 502 (+1908%)
Mutual labels:  lightweight

Zoom By Ironex

Lightweight (8 Kb) ES5 javascript plugin without any dependencies, compatible with desktop and mobile devices.

Supports doubleclick, mousemove, mousewheel, doubletap, touchmove and pinch events.

Demo

https://zoom.by-ironex.com

Installation

  • Option 1
  • Option 2
    • Add <script src="https://github.com/directory/zoom-by-ironex.min.js"></script> to the bottom of html <body>

Whole script is just a single function called "zoom".

How To Use

HTML

<div class="zoom"> <!-- Image container, this class can be renamed in settings -->
  <img src="image-file" alt="Image">
</div>

CSS (Optional)

.zoom-transition{ // Transition class name can be renamed in settings
  transition: -moz-transform ease 200ms;
  transition: -ms-transform ease 200ms;
  transition: -o-transform ease 200ms;
  transition: -webkit-transform ease 200ms;
  transition: transform ease 200ms;
}

JS

zoom();

Settings

Example call with all possible settings

  zoom({
    active: "zoom-active", // Class added to container when it is zoomed
    transition: "zoom-transition", // Class added to images when they are being animated, class is removed after animation is finished
    visible: "visible" // Class added to images after they are loaded,
    zoom: "zoom" // Image container class
  }, {
    scaleDefault: 2, // Used on doubleclick, doubletap and resize
    scaleDifference: 0.5, // Used on wheel zoom
    scaleMax: 10, // Maximum zoom
    scaleMin: 1, // Minimum zoom
    scrollDisable: true, // Disable page scrolling when zooming an image
    transitionDuration: 200, // This should correspond with zoom-transition transition duration
    doubleclickDelay: 300 // // Delay between clicks - used when scripts decides if user performed doubleclick or not
  }, (function ($container, zoomed) {
    console.log(zoomed); // Callback, gets triggered whenever active class is added/removed from container, value of zoomed is true or false
  }));

Supported Events

  • doubleclick
  • mousemove
  • mousewheel
  • doubletap
  • touchmove
  • pinch

Additional Info

Plugin checks if image container (zoom) exists on window.load and executes for each element with image container class. If there is no element with specified class present, then it stops.

  • It means, that there is no need to check if image container (zoom) exists before executing the zoom function
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].