Grow your CSS skills. Land your dream job.

Colorbox combined with anything slider shows 2 more photos

  • # February 23, 2013 at 1:44 pm

    I am having trouble with the colorbox i just added on my website.
    It turns out that when I apply colorbox on the “anything slider” images, it will show two more images.
    They are the first image and last one which get repeated and I don’t know why.
    Any help?

    # February 24, 2013 at 12:03 pm

    any idea on how to fix it?

    # February 24, 2013 at 1:40 pm

    Hi GSquadron!

    If you look at the script for the [first demo on this page](http://css-tricks.github.com/AnythingSlider/demos.html), you’ll see that it uses ColorBox. In the code you just need to make sure you don’t include the cloned panels (needed for infinite scrolling). Something like this:

    $(‘#slider1′)
    .anythingSlider()
    .find(‘.panel:not(.cloned) img’) // ignore the cloned panels
    .attr(‘rel’,’group’) // add all slider images to a colorbox group
    .colorbox();

    # February 24, 2013 at 3:41 pm

    In which ones code? On the anything slider or the color box?
    Since it already uses colorbox, should I delete the colorbox plugin?

    Tx for the reply

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".