NectGen Nivo slider and lightbox – not working
-
I hav ebeen trying to get a lightbox plugin working with the NextGen Nivo Slider, and I can’t seem to get it working! I tried several lightbox plugins everything fails…
Here’s what I did: A lightbox needs the images to be wrapped in links. In rules 221, 231, 260 and 271 of the file query.nivo.slider.js I changed:
$('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({
into:
$('<div class="nivo-slice" name="'+i+'"><a href="'+ vars.currentImage.attr('src') +'" rel="lightbox"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></a></div>').css({
Thus wrapping the image with:
<a href="'+ vars.currentImage.attr('src') +'" rel="lightbox"></a>
This does make the images (except for the first, another annoyance) in the slideshows clickable, and it provides a normal link, a fullscreen pic in my browser. But I just can’t get the links produced in a lightbox!!! I also set the WordPress effect to ‘Lightbox’ but I guess that is overruled by the Nivo slider?
As a lightbox plugin I am now using WP Lightbox 2, but as said, it doesn’t work with any of them (Easy Fancybox, Fancybox for WordPress and jQuery Lightbox are some of the plugins I tried).
My wp_header() and wp_footer are all in place and other jQuery-based plugins are working, so that’s not it…
Anyone got a solution? THX! Any other slideshow plugin will do also, as long as it loads from NextGen.
- The topic ‘NectGen Nivo slider and lightbox – not working’ is closed to new replies.