It relies on having thumbnails to swap
so no thumbnails = no functionality

better to use the image ID for basic functionality
and the thumbnails as an option

11-10-2012, 04:22 AM

jscheuer1

Quote:

Originally Posted by vwphillips

about your demo

It relies on having thumbnails to swap
so no thumbnails = no functionality

better to use the image ID for basic functionality
and the thumbnails as an option

I see your point and will consider it visa vis modifying how the script is invoked. However, as it currently stands, if you don't want to have thumbnails - want a single Featured Image Zoomer, you can use the old syntax with the new script:

OK, I decided to go with you're suggestion. The new syntax is like the old syntax with an added property to turn on multizoom:

Code:

$('#image2').addimagezoom({ // options same as for previous Featured Image Zoomer's addimagezoom unless noted as '- new' or '- requires multizoom' multizoom: '.triggers2 a', // triggers for image swapping (required for multizoom) - new
descArea: '#description2', // description selector (optional - but required if descriptions are used) - requires multizoom
disablewheel: true // even without variable zoom, mousewheel will not shift image position while mouse is over image (optional) - new
//^-- No comma after last option!
});

If you use the multizoom property, it will use those thumbnail links to setup a multizoom feature. If not, it will act like the previous version. So it's no longer a new script, nor an addon, rather an update of the existing Featured Image Zoomer.

Some of the new features are available even in single image mode. The code has changed slightly. The updated demo page reflects these latest developments both in code and documentation. Same address:

I have been updating frequently. Make sure to clear your browser cache before downloading.

As for:

Quote:

Just a matter of getting the DD script updated?

Perhaps. The official version has not been updated yet.

On a side note - I've been working on a tweak where if there's markup for thumbnails associated with an image, that invokes multizoom, no extra multizoom property needs to be specified. However, it breaks down in the latest jQuery versions (1.8+), probably due to a bug. I'm thinking of going with it anyway and requiring jQuery 1.7.2 (the latest without this bug) and possibly making a bug report. A bug report is extra work though and I would have better luck with it if I could further isolate the cause. As it stands now, I can only tell what code invokes it, not the actual problem. Took me forever to realize it was version specific, I should have checked that sooner.

Edit:I found a workaround. The problem is in jQ 1.8+ and relates to a problem with its .not() function which is documented and supposedly fixed, but obviously not entirely. I found that by using the :not() selector instead of the function I was able to get jQ1.8 to cooperate. So now I've updated the live development demo with the new code. You can still specify a selector for the thumbnails if you choose. But if you use the expected format, the script will detect it and use it. The format is the selector for the image as a classname with an added classname, 'thumbs'. So image1's thumbnails go in an element with a class of "image1 thumbs". I needed the not (whether selector or function doesn't matter) to filter out the thumbnails should someone choose to select the primary zoomable image tag via a classname.