MooZoom is an image zoomer used to dynamically expand thumbnail images into full images with shadows. Shadows are provided by the box-shadow CSS property for browsers that support it, thus no extra images are required. This can be a drop-in replacement for FancyZoom, since it looks for the same DOM structures.
Compatible with all modern browsers and IE6.
MooZoom can be initialized at any time, but it's best to initialize it on the "domready" event. By default, zooms will take 250ms, but you can change this with the "duration" option. The "close" option can be set to "none", "top-left", "top-right", "bottom-left", or "bottom-right" to specify where and if the close button should be displayed. By default it displays in the top-left corner. The "transition" option can be used to override the default Fx.Transition.
Important note: The close button image is located in the Images directory. By default, MooZoom will attempt to find that image at /images/moozoom_close.png. If you want the image located elsewhere, use the "imageRoot" option.
MooZoom will look through the DOM for <a><img></a> patterns. The inner image should be the thumbnail version, and the href for the <a> tag should be a link to the full scale version of the image. In this way, it's compatible with non-JavaScript browsers as well.
<a href="/images/picture1.jpg"><img src="/images/picture1_thumb.jpg"></a> <a href="/images/picture2.jpg"><img src="/images/picture2_thumb.jpg"></a> <a href="/images/picture3.jpg"><img src="/images/picture3_thumb.jpg"></a> <script type="text/javascript"> window.addEvent("domready", function() { new MooZoom({ duration: 150, imageRoot: "/images/plugins/" }); }); </script>
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus