MooTools Zoomer Plugin
I love to look around the MooTools Forge. As someone that creates lots of plugins, I get a lot of joy out of seeing what other developers are creating and possibly even how I could improve them. One great plugin I've found is Zoomer by Anton Samoylov. Zoomer provides an elegant method for zooming in on large images.
The HTML
<img src="cricci.jpg" alt="Muse: Christina Ricci" big="cricci-large.jpg" id="ricci" />
Note the big attribute within the image is where the you place the path to the larger image. This is the default usage of the plugin -- you may also provide the path to the larger image within the plugin instance options object.
The MooTools JavaScript
window.addEvent('domready',function() { new Zoomer('ricci',{ smooth: 10/*, big: 'cricci-large.jpg' */ }); });
Using Zoomer is as easy as the code above -- simply provide the ID of the image and the custom smooth setting. As mentioned above, you may also define the larger image path within the instance.
Sweet huh? My praise goes out to Anton for his excellent plugin. I love how easy this plugin is to implement. Remember though -- Zoomer is just one of hundreds of quality plugins in the MooTools Forge. Are your plugins in the Forge?
Great & useful plugin !
Is there any chance to have an equivalent plugin working with jQuery ?
Thats really neat!
very very neat, nice fade effect when you mouseout. Nice Anton Samoylov and DW, MT FTW!
very nice effect
Awesome indeed!
Nice, I like this effect much better than the usual zoom effect with a small zoom box on top the the original image
smooth effect, though I think you should be adding a CR-category by now…
Hello David,
thats really gorgeous.
May be you can show us how this works with your nina ricci slide-show.
way to go…. I must want to include/use it on my photography site
quote doxe, exist plug-in jquery? :)
Hello David,
Nice script!
Just a tiny comment on mouse events :)
From usability point of view, i believe it will be better to disable click and drag when you mouse over to zoom.
Usually people are not getting into the meaning of new type of cursor, so they click and often click and drag.
In you script when you mouse over and click, so the thumb appears over the large(zoomed) image.
Here is a screen-shot http://i.imgur.com/PSjLJ.jpg
I believe what you have created is greater than what i have written here and it’s maybe not important but it’s definitely usable.
T4A
Keep up the good work!
jQuery port http://github.com/creaven/zoomer-jq/
@moro: hi, work with mozilla firefox, don’t work with internet explorer 7 :(
fixed ________________
thanks :) very good work!!
Hi there, is there a way to change the big image via javascript ? I’m trying to build a gallery with the picture+zoom capabilities and thumbnails. But I can only change the src picture.
This is not working :
thanks,
hnal
Very cool and attactive
Very cool and effective
@hnal:
I have same problem… Have you found solution?
@luki:
Hello, i’m still stuck with that issue. Nom i’m trying to reload the entire page when someone click on a thumbnail..
And you ?
it’s my way. Hope will get help.
1. keep the reference of the Zoomer instance.
2.when you want to change the big picture, do this.
Thanks for the reply! I tried your solution but I couldn’t make it work! Do you have a full exemple where it is working?
great plugin!!!
Could you change a picture for demo?
It scare me… …
Try this:
Have an problem with this plugin, i work on rails 2.3.8 and this plugin re-submit the current page with id => ” _” … And cause an Active RecordNotFound :-/
I also have similar problem, when using with prettyphoto – jquery lightbox alternative, background set as (_), applied in inline style causing problem, error and zooming doesn’t work at all.
Pls check at this url:
http://projects.xcellence-it.com/rahulraj-prettyphoto-zoomer/
And mouse hover on first/top project box, which will open slider, and click on Location Plan. This open iframe where zoomer is implemented.
Zooming sometimes work and sometimes not in FF.
And in IE, it works only for the first time.
Please help us how to fix this…
Regards
Krunal
Just an update that I’m not using Rail. Mine was only pure xhtml project. But this has caused error and hence zoomer doesn’t work when using prettyphoto iframe.
very nice. would that also work with image maps in the larger image?
Hi!
Very nice! I like it!
And so I’ve used it!
But somehow it’s not working properly:
In Mozilla Firefox it’s perfect but on IE only when viewed on my PC at home. When I upload it on the server and look at it with IE, the enlarged picture is vertically twisted.
I have no idea why???
I’m thankfull for any ideas
Sorry!
Here the address of the problem:
http://members.aon.at/rhomy/Homepage_ADEG_Kurt_Muellner/default.htm
Thanks,
michaela
Perhaps worth noting: the Zoomer plugin does not work 100% with the latest MooTools 1.3 release (I’ve tried with Zoomer 1.9.3., which is the newest I could find).
However, the fix for this is tiny:
Line 149:
$clear(this.timer);
should be:
clearTimeout(this.timer);
$clear has been deprecated, causing the stopZoom function to stop working, therefore the picture stayed zoomed.
Hy David!
Is there a way to have multiple images with zoom on one page without to have for every id or every new image a nev zoomer ? Just one class for every image.
ex.
new Zoomer('.multipleimg');
Thanks
Sorry!
I am new so I wraped in
:) the
Hy David!
Is there a way to have multiple images with zoom on one page without to have for every id or every new image a nev zoomer ? Just one class for every image.
ex.
new Zoomer(‘.multipleimg’);
img src=img1.jpg class=multipleimg big=img1big.jpg
img src=img2.jpg class=brainstorm big=img2big.jpg
etc…….
Thanks again
Sorry, I am posting again. I am new so please forgive my clumsiness. Maybe you could delete my older posts.
ony image – one zoomer, iterate and create new Zoomer for each image.
Is there a way to iterate the java script code automatically every time a new image is added? (for the sake of easiness)
Hello,
i’am french, Greatulation for this script.
I have a question please.
It’s possible of change “id=”ricci” by the class=”ricci” ?
i have a error her ==>
initialize: function(element, options){
this.setOptions(options);
this.small = document.id(element);
document.id .
Please what the code for a class ?
Thanks