PhotoZoom.js

Author

Arun Kumar Sekar

Author @ 9lessons.info

PhotoZoom

A lightweight jQuery plugin for viewing bigger images, this helps you to enrich you web application usablity.

Browser Support

jQuery

- Jquery Library (version 1.7.0+)

How to use

Init

    $(document).ready(function(){
        $(selector).photoZoom();
    });

Options

- zoomStyle // Write your own css for large image

Example

     $(document).ready(function(){
         $("body").photoZoom({ zoomStyle : { "border":"1px solid #ccc",
                                             "background-color":"#fff",
                                             "box-shadow":"0 0 5px #888"
                                           }
                            });
     });

Events

- onMouserOver(currentImage) // Triggers when before zooming image
    - onMouseOut(currentImage) // Triggers when focus out from image

Example

     $(document).ready(function(){
         $("body").photoZoom({ onMouseOver  : function(currentImage){
                                                console.log(currentImage);
                                                // do something
                                              },
                               onMouseOut   : function(currentImage){
                                                console.log(currentImage);
                                                // do something
                                              }
                            });
     });