views:

262

answers:

1

Hi,

I use MorfeoShow gallery for Joomla. Recently I faced strange error while changing gallery style to FancyBox1.

I got error:

$(".photo-link") is null
full line:
$(".photo-link").fancybox({ "zoomSp...edOut": 500, "overlayShow": true }); 

What is the problem ? Maybe script conflicts with other scripts ? .photo_link classes exists.

MorfeoShow: release 1.2.0 Joomla: 1.5.15

I would be appreciated for your help.

A: 

Found a solution for this problem. So I will share it.

Main problem is conflict between scripts. Many Joomla templates use Mootools. And MorfeoShow uses JQuery. By the way, mine template is ja_halite from JoomlaArt.

So I changed

$(".photo-link").fancybox({ "zoomSp...edOut": 500, "overlayShow": true }); 

in MorfeoShow frontend component, morfeoshow.php, line ~117(components/com_morfeoshow/morfeoshow.php) to:

    jQuery.noConflict();
    jQuery(document).ready(function() {
        jQuery(".photo-link").fancybox({
            "zoomSpeedIn": 500,
            "zoomSpeedOut": 500,
            "overlayShow": true
        });
    });

Also if you use Morfeo plugin(plugins/content/morfeoshow.php), change the same code in ~113 line.

Hope this helps.