[Plugin: WordPress NextGen GalleryView] Solution: How to add a link and a class to selected image
-
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, Kiwimaniahttps://www.ads-software.com/extend/plugins/wordpress-nextgen-galleryview/
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘[Plugin: WordPress NextGen GalleryView] Solution: How to add a link and a class to selected image’ is closed to new replies.