|
Project Information
Members
Links
|
DescriptionZoomer is a Prototype.js extension for displaying a bigger version of an image in the same occupied space. It's ideal for product showcases, where close-up details are important (bikes, clothing, etc). Features
ExampleYou can test the extension on this page RequirementsZoomer.js needs the Prototype.js JavaScript framework to work Usage
<script type="text/javascript" src="prototype.js"></script> <script type="text/javascript" src="zoomer.js"></script> <a href="/path/to/large/image.jpg" id="linkID"><img src="/path/to/small/image.jpg" /></a> new Zoomer('linkID');$$('a[rel="zoomer"]').each(function (a) {
new Zoomer(a);
});Available optionsThere are some options available to help interact with Zoomer easily. The options are passed after the element, as JavaScript hash: new Zoomer(element, {optionA: value, optionB: value}
new Zoomer(element, {
afterZoomIn: function () {
alert("Zoomed in");
},
afterZoomOut: function () {
alert("Zoomed out");
}
});
|