WordPress.org

Ready to get started?Download WordPress

Forums

Photoswipe for NextGEN Gallery
[resolved] JQuery Colorbox and Photoswipe vor NextGen Gallery (4 posts)

  1. thomasfessl
    Member
    Posted 1 year ago #

    I am currently using the JQuery Colorbox plugin with the NextGEN Gallery and your Photoswipe for NextGen on my site - http://www.fessl.it - and it works great. However when browsing my site on a mobile device and I close the image the JQuery window appears. It seems it opens Photoswipe over JQuery Colorbox.
    Any ideas how to disable JQuery Colorbox for mobile devices? Thank you in advance.

    http://wordpress.org/extend/plugins/photoswipe-for-nextgen-gallery/

  2. Guillermo Seņas
    Member
    Plugin Author

    Posted 1 year ago #

    The colorbox plugin is not currently supported, but you could give it a try adding the bold lines to the ngg-photoswipe.js file:

    jQuery(document).ready(function(){
    //Remove thickbox effect:
    jQuery('a.thickbox').removeClass ("thickbox");
    //Remove lightbox effect:
    jQuery('a[rel^="lightbox"]').attr("rel","");
    //Remove colorbox:
    jQuery('a.cboxElement').removeClass ("cboxElement");

    //Remove highslide effect:
    jQuery('a.highslide').removeClass("highslide").attr("onclick","");
    //Remove shutter effect:
    jQuery('a[class^=shutterset]').removeClass (function (index, css) { return (css.match (/\bshutterset\S+/g) || []).join(' ');
    });
    });

  3. wpwood3
    Member
    Posted 1 year ago #

    I was able to get jQuery Colorbox working perfectly with Photoswipe for NextGEN gallery.
    Here's how...

    Edit this file:
    photoswipe-for-nextgen-gallery/js/ngg-photoswipe.js

    Near the top of that file replace this:

    //Ready for photoSwipe!
    jQuery(function(){
    	if (jQuery(".ngg-gallery-thumbnail a").length > 0) {
    		jQuery(".ngg-gallery-thumbnail a").photoSwipe({

    With this:

    //Ready for photoSwipe!
    jQuery(function(){
    	if (jQuery(".ngg-gallery-thumbnail a").length > 0) {
    	jQuery('a.cboxElement').removeClass ("cboxElement");
    		jQuery(".ngg-gallery-thumbnail a").photoSwipe({
  4. nonamebaby
    Member
    Posted 11 months ago #

    Well, if this isn't working for you try disable "loading in footer" in jQuery Colorbox settings!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic