tags:

views:

39

answers:

1

Hi All

I'm using this zoom script on my site:

http://www.gcmingati.net/wordpress/wp-content/lab/jquery/minizoompan/

At present, the default setup is that it immediately starts the zoom effect when you hover the image with your mouse.

How can I make it that it needs a click first to activate it? So the zoom only starts on a click event. Is it possible?

Thanks in advance!

A: 

The quick hack is to look at the script where you see "div.hover" and change it to div.click. The plugin is not written very well.

The correct way would be to pass a start event and a stop event to the settings, and change the script so that it sets a default hover event if none is specified, then change "div.hover()" to

div.bind(settings.startEvent, function () {...});
div.bind(settings.stopEvent, function () {...});
Shawn J. Goff
Cool, works fine like that - just used div.toggle instead of div.click so a second click will revert to the un-zoomed image. Good stuff.
Sam