Skip to content
jacoblwe20 edited this page Aug 31, 2011 · 11 revisions

Modifying Zoomy

$('selector').zoomy(event, {options})

Event

The event supports any event that is supported by .bind. Also custom events can be created but note that the movement of Zoomy is determined by 'mousemove'. So most common usage is 'click dblclick mouseover mouseenter'.

Options

zoomSize: interger

Zoom Size is the diameter or the width of the zoomy element. This needs an interger to be passed in, and the interger number directly translates to pixels. So 100 is equal to '100px'. By default this is set to 200.

round: boolean

This is option is to toggle on and off the border-radius. This not only remove border-radius for the zoomy element but also for the glare if it is currently on. This take a boolean variable and is by deafult set to 'true'.

glare: boolean

Option for displaying a small gradient towards the top of the zoomy element. This take a boolean variable and is by deafult set to 'true'.

clickable: boolean

This options was set up to allow developers to hook other functions to zoom element or just nativly use the anchor tag.This take a boolean variable and is by deafult set to 'false'.

attr: string

This was a new option to 1.2.1. This allows you to store the path to the zoom image in another attr like zoomy-data = "./path-to/zoom-image.jpg" so that way if you would like to send a user to another page you may use the anchor tag nativly and store the link in the href. Note that clickable and attr kind of work in tandem. By default attr is set to 'href'.

Clone this wiki locally