Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #14344

    I want to use a different plugin for my lightbox instead of pretty photo. Currently I have installed wp-jquery-lightbox and I am getting TWO seperate lightboxes on a photo gallery.http://johnsoncountytnchamber.org/red-tail-golf-course/ Help!

    #83003

    Hey,

    Open js > custom.js then remove this code

    function my_lightbox($elements)
    {
    jQuery('.gallery-item a').attr('rel','lightbox[grouped]');

    jQuery($elements).prettyPhoto({
    "theme": 'light_square' /* light_rounded / dark_rounded / light_square / dark_square */
    });

    jQuery($elements).each(function()
    {
    var $image = jQuery(this).contents("img");
    $newclass = 'lightbox_video';

    if(jQuery(this).attr('href').match(/(jpg|gif|jpeg|png|tif)/)) $newclass = 'lightbox_image';

    if ($image.length > 0)
    {
    if(jQuery.browser.msie && jQuery.browser.version < 7) jQuery(this).addClass('ie6_lightbox');

    var $bg = jQuery("<span class='"+$newclass+" ie6fix'></span>").appendTo(jQuery(this));

    jQuery(this).bind('mouseenter', function(){
    $height = $image.height();
    $width = $image.width();
    $pos = $image.position();
    $bg.css({height:$height, width:$width, top:$pos.top, left:$pos.left});
    });
    }

    });

    jQuery($elements).contents("img").hover(function(){
    jQuery(this).stop().animate({opacity:0.5},400);
    },function(){
    jQuery(this).stop().animate({opacity:1},400);
    });

    }

    Regards,

    Ismael

    #83004

    Ok, did that but when I removed it, both the pretty photo and wp-jquery-lightbox both quit working.

    #83005

    Hello,

    Find this code on the same file.

    my_lightbox("a[rel^='prettyPhoto'], a[rel^='lightbox']");

    Replace it with

    //my_lightbox("a[rel^='prettyPhoto'], a[rel^='lightbox']");

    Regards,

    Ismael

    #83006

    That did the trick. Thanks so much for the EXCELLENT support for the Display template!

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘I want to disable your lightbox function in Display Theme’ is closed to new replies.