Code to avoid javascript conflicts with other fancybox addons
Permalink Browser Info Environment
Hi,
I am the author of several image gallery addons that utilize the Fancybox plugin. As of now, your Fancy Image Links addon will cause javascript errors if it is used with another addon that also uses Fancybox. You can fix this problem by changing lines 33 and 34 in /packages/fancy_image_links/blocks/fancy_image_links/controller.php from this:
...to this:
Best,
Jordan
I am the author of several image gallery addons that utilize the Fancybox plugin. As of now, your Fancy Image Links addon will cause javascript errors if it is used with another addon that also uses Fancybox. You can fix this problem by changing lines 33 and 34 in /packages/fancy_image_links/blocks/fancy_image_links/controller.php from this:
$this->addHeaderItem($html->css($bv->getBlockURL() . '/fancybox/jquery.fancybox-1.3.4.css')); $this->addHeaderItem($html->javascript($bv->getBlockURL() . '/fancybox/jquery.fancybox-1.3.4.pack.js'));
...to this:
$this->addHeaderItem($html->css($bv->getBlockURL() . '/fancybox/jquery.fancybox-1.3.4.css', null, array('handle' => 'jquery.fancybox', 'version' => '1.3.4'))); $this->addHeaderItem($html->javascript($bv->getBlockURL() . '/fancybox/jquery.fancybox-1.3.4.pack.js', null, array('handle' => 'jquery.fancybox', 'version' => '1.3.4')));
Best,
Jordan
Type: | Discussion |
---|---|
Status: | New |