0.2.5 • Published 5 years ago

zoomify v0.2.5

Weekly downloads
8
License
MIT
Repository
github
Last release
5 years ago

Zoomify

Join the chat at https://gitter.im/indrimuska/zoomify

Zoomify is a jQuery plugin for simple lightboxes with zoom effect.

Check out the examples page: http://indrimuska.github.io/zoomify.

Zoomify: jQuery Plugin for lightboxes

Installation

<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="js/vendor/zoomify/dist/zoomify.min.js"></script>
<link href="css/vendor/zoomify/dist/zoomify.min.css" rel="stylesheet">

Usage

Enable zoomify via JavaScript:

$('img.myImage1').zoomify(); // Default settings
$('img.myImage2').zoomify({ duration: 1000 }); // 1s duration

Options

PropertyTypeDefaultDescription
durationinteger200Transition duration in milliseconds.
easingstring"linear"Transition property name.
scalefloat0.9If the image is bigger than the size of the page, it represent the maximum zoom scale according to page width/height (from 0 to 1).

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-duration="".

Methods

MethodDescription
zoomStarts a zoom-in or a zoom-out transformation depending on the state of the image.
zoomInStarts a zoom-in transformation.
zoomOutStarts a zoom-out transformation.
repositionCalculates the correct position of the image and moves it at the center of the visible part of page.

Example of call the zoomIn() method:

$('#myImage').zoomify('zoomIn');

Events

EventDescription
zoom-in.zoomifyFired before each zoom-in transformation.
zoom-in-complete.zoomifyFired after each zoom-in transformation.
zoom-out.zoomifyFired before each zoom-out transformation.
zoom-out-complete.zoomifyFired after each zoom-out transformation.
$('#myImage').on('zoom-in.zoomify', function () {
    // do something...
});

License

Copyright (c) 2015 Indri Muska. Licensed under the MIT license.

0.2.5

5 years ago

0.2.4

9 years ago

0.2.1

9 years ago