Adding rel="nozoom" to the link attributes does disable the FancyZoom functionality but it also disables the Lightbox modal window on my images. How can I use FancyZoom on some sections of the site but Lightbox on others. I have a View gallery using Lightbox as the formatter and want the images to open only in Lightbox modal. The FancyZoom is still opening behind the Lightbox modal.

Suggestions on how to fix this?

-Trevor

Comments

ambientdrup’s picture

See my work-around here:

http://drupal.org/node/298427#comment-5570606

-Trevor

thinkyhead’s picture

Status: Active » Fixed

This was relatively easy to fix by tweaking the FancyZoom Javascript. The changes are:

standard/FancyZoom.js - Lines 96-99:

      if (!/(light|thick)box|nozoom/.test(rel) && !/thickbox/.test(links[i].className)) {
        links[i].onclick = function (event) { return zoomClick(this, event); };
        links[i].onmouseover = function () { zoomPreload(this); };
      }

jquery/FancyZoom.js - Lines 78-79:

      return (h && h.search(/(.*)\.(jpg|jpeg|gif|png|bmp|tif|tiff)/gi) !== -1
        && !/(light|thick)box|nozoom/.test($(this).attr('rel')));

Download an updated FancyZoom JS tarball including the min versions at: http://www.thinkyhead.com/design/fancyzoom

ambientdrup’s picture

Tested and seems to work. Thanks!

-Trevor

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.