Giter Site home page Giter Site logo

zoomify's Introduction

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

Property Type Default Description
duration integer 200 Transition duration in milliseconds.
easing string "linear" Transition property name.
scale float 0.9 If 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

Method Description
zoom Starts a zoom-in or a zoom-out transformation depending on the state of the image.
zoomIn Starts a zoom-in transformation.
zoomOut Starts a zoom-out transformation.
reposition Calculates 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

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

License

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

zoomify's People

Contributors

dependabot[bot] avatar gitter-badger avatar indrimuska avatar jmalarcon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zoomify's Issues

Problem with images with margin

Hi, I really liked this script, but I came across one feature.
I have images with margin-top in styles, when i use Zoomify for image data, the enlarged image when clicked is shifted up by the number of pixels in the margin-top for image. This is especially noticeable if the image is large and scale is set to 0.98 for better magnification. When scrolling, the image becomes centered, but when clicked, it is shifted up. I tried to see something myself, but I didn’t succeed. For the test, create a large image with Zoomify and a 100 pixel margin top in image style. I just wrote what I saw, because I couldn’t fix it myself, thanks.
( wrote using google translator :) )

Pitt Digital Library unsupported

Dear friends,

I don't know if this is the proper location to submit this - I did a lot of research and wasn't able to decide, I'm new to all of this.

The issue is that Digital Library of University of Pittsburg is not supported. I tried to use the addon in three different browsers. I also have tried to go the alternative way, searching for the link in the developer tab, but nothing really worked.

Thank you!

Here is an example: https://digital.library.pitt.edu/islandora/object/pitt%3Awmlp0056

Hi freind!

Hey. I like your plugin. I installed it on one of my projects and I think that I will use it on others. But I need your help in finalizing the plugin.

Or you need a function to reload the plugin so that it reads the contents of the page again.

Or implement a double-execution lock.

I will be glad if you solve this problem.

Explanation: If you enable the plugin, and then load the data using Ajax, then the new data will not be processed by the plugin. If it is also initiated again, the first images will be enlarged with duplication.

Thumbnails preview

Hi, i really liked this one lib. But i have to ask:
how to load the thumbnail, and after the click event call the large img

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.