WordPress.org

Ready to get started?Download WordPress

Forums

WordPress NextGen GalleryView
Solution: How to add a link and a class to selected image (4 posts)

  1. kiwimania
    Member
    Posted 1 year ago #

    Hello!

    Some people asked for this, so here is a simple solution:
    Open "jquery.galleryview-2.0.js" from the folder "scripts". Search for line 873:

    } else {
    						p = $('<div>');
    						p.addClass('panel');
    						im = $('<img />');
    						im.attr('src',j_frames.eq(i).find('img').eq(0).attr('src')).appendTo(p);
    						p.prependTo(j_gallery);
    						j_frames.eq(i).find('.panel-overlay').remove().appendTo(p);
    					}

    add a line after line 877 to:

    } else {
    						p = $('<div>');
    						p.addClass('panel');
    						im = $('<img />');
    						im.attr('src',j_frames.eq(i).find('img').eq(0).attr('src')).appendTo(p);
    						im.wrap("<a href='" + im.attr("src") + "' class='fancybox'/>");
    						p.prependTo(j_gallery);
    						j_frames.eq(i).find('.panel-overlay').remove().appendTo(p);
    					}

    as you can see, here you can add a link to the image itself for a bigger sized view and a class, for expample "fancybox" to add a popup script.
    Cheers, Kiwimania

    http://wordpress.org/extend/plugins/wordpress-nextgen-galleryview/

  2. alfredo49
    Member
    Posted 1 year ago #

    The link works but the class dont open the popup script , also i use fancybox for wordpress plugin , also i try with lightbox plus plugin but it doesnt work

  3. kiwimania
    Member
    Posted 1 year ago #

    I use the plugin "Easy FancyBox" and it works fine with it. Maybe you could try this, too?: http://wordpress.org/extend/plugins/easy-fancybox/

  4. alfredo49
    Member
    Posted 1 year ago #

    Thnxs! i will try!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.