The Jet Zoom JavaScript API allows developers to interact with Jet Zoom and add additional functionality.
You can create your own instances like this:
options = {}; // This would be your options object. $('#myImage').JetZoom(options); // jQuery way. myInstance = new JetZoom($('#myImage'),options); // 'normal' way.
You can get the Jet Zoom instance that belongs to a particular image:
myInstance = $('#myImage').data('JetZoom');
Once an instance has been obtained, call methods like this:
myInstance.loadImage('/smallimage.jpg','/largeimage.jpg'); myInstance.destroy();
Call static methods like this:
JetZoom.someStaticMethod();
Bind handlers to Jet Zoom events like this:
$('#myImage').bind('jetzoom_ready',function(){alert('Jet Zoom is ready!'});
Method Attributes | Method Name and Description |
---|---|
Test API call.
|
|
Removes Jet Zoom from the image.
|
|
Loads a new image into a Jet Zoom instance
|
|
<static> |
JetZoom.
.quickStart
Quick start function for Jet Zoom
|
<static> |
JetZoom.
.setAttr
Sets the attribute name to use for defining Star Zoom options in HTML. |
Event Attributes | Event Name and Description |
---|---|
<static> |
JetZoom.jetzoom_ready()
Fired when an images have loaded succesfully.
|
Sets the attribute name to use for defining Star Zoom options in HTML.
Default is data-jetzoom.
This can be useful when you don't want to use HTML5 style data attributes.
For instance, you could set the attribute name to 'rel' or 'onclick'