• Hi Guys,

    I previously hard coded the colorbox plugin in to the site and used it on some content items to bring up some pictures.

    Ive now plugged in the colorbox plugin to make this work on my blog gallery images (which it does do fine) but this has broken the other items, how can i add it so the items below are also controlled by the plugin?

    $(document).ready(function(){
    //Examples of how to assign the ColorBox event to elements
    $(“a[rel=’gallery’]”).colorbox({transition:”fade”});
    $(“a[rel=’gallery2′]”).colorbox({transition:”fade”});
    $(“a[rel=’gallery3′]”).colorbox({transition:”fade”});
    //Example of preserving a JavaScript event for inline calls.

    });

    Many thanks in advance

    Martin

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor techotronic

    (@techotronic)

    Hi,
    could you post links to a page or post where the plugin works and one where it doesn’t?
    Cheers,
    Arne

    Thread Starter fullphat

    (@fullphat)

    Hi Arne,

    I’ve had to remove it so it works on one page as the client needed the site up sharpish, You can see the page where Ive used it by hand coding it here: https://www.quidhamptonmill.co.uk/rooms

    Yet when I install the plugin on this page: https://www.quidhamptonmill.co.uk/blog the colorbox works on the gallery images fine but then I cant use my own hard coded colorbox, I didnt know if there was anyway of integrating the two?

    Cheers

    Martin

    Plugin Contributor techotronic

    (@techotronic)

    Hi,

    ok, I think I know why the links don’t work with my plugin:
    The plugin only adds the Colorbox effect automatically if an a tag contains an img tag and links to an image.
    If you want text links to open in a colorbox, you’ll have to add the CSS class “colorbox-link” to the link:
    https://www.techotronic.de/plugins/jquery-colorbox/opening-links-colorbox/

    Cheers,
    Arne

    Thread Starter fullphat

    (@fullphat)

    Does that still allow me to add multiple images in their own mini gallery as such?

    Thanks for your help..

    Plugin Contributor techotronic

    (@techotronic)

    Hi,

    no, having multiple links on one page with the CSS class “colorbox-link” group together automatically is currently not possible. I’ll have to think about a good solution for having more than one group for links.

    Cheers,
    Arne

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding a new selector to the colorbox plugin’ is closed to new replies.