Skip to content

twslankard/ql_zoom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jquery.ql_zoom.js

A jQuery zoom plugin that uses canvas.

v0.0.3

About

Uses an asychronously loaded full size image to create a "magnifying glass" effect on a scaled image with the HTML5 canvas element. See an example here.

Usage

Just invoke the plugin on a parent element which wraps your image.

<div id="elem">
  <img src="/path/to/scaled.jpg" data-url="/path/to/full_sized/jpg" />
</div>

...

$('#elem').ql_zoom(options);

Where options is a hash of settings. Here are the configurable options and their default values:

  • width: '200px'
    • Distance in pixels
    • Controls the width of the zoom viewer
  • height:'200px'
    • Distance in pixels
    • Controls the height of the zoom viewer
  • speed: 800
    • Time in milliseconds
    • Sets the speed of the fade in / out of the zoom viewer
  • throttle: 50
  • pointer: 'crosshair'
    • CSS value
    • Changes the style applied to the mouse pointer
  • canvas_style: 'border:1px solid #444;'
    • CSS string
    • Any additional CSS you'd like to apply to the canvas element when it's initialized

In addtion to throttle, jquery.ql_zoom uses Paul Irish's imagesLoaded event to help with reliable cross browser image loading.

About

jQuery image zoom plugin with Canvas

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors