Search code examples
jqueryfancybox

Fancy box - how to show slideshow from a single thumbnail


My thumbnails are paginated so that on any one page there are only 6 thumbs, and about 4 pages (for a total of 24 images in a category)

if I set it up on one of the pages it just shows the 6 related images on that page.

How can I use Fancybox to show a slideshow of all 24 images?

Many thanks in advance!

Richard


Solution

  • this is how i do it (but with multiple)

    /*Fotos de la galeria*/
    var galPhotos = [{
      href: '../img/galeria/fondo1.jpg',
      'nextEffect': 'fade',
      'prevEffect': 'fade'
    }, {
      href: '../img/galeria/fondo2.jpg',
      'nextEffect': 'fade',
      'prevEffect': 'fade'
    }, {
      href: '../img/galeria/fondo3.jpg',
      'nextEffect': 'fade',
      'prevEffect': 'fade'
    }, {
      href: '../img/galeria/fondo4.jpg',
      'nextEffect': 'fade',
      'prevEffect': 'fade'
    }, {
      href: '../img/galeria/fondo5.jpg',
      'nextEffect': 'fade',
      'prevEffect': 'fade'
    }, {
      href: '../img/galeria/fondo6.jpg',
      'nextEffect': 'fade',
      'prevEffect': 'fade'
    }];
    $('a#gallery').live('click', function() {
      $.fancybox(galPhotos);
    });
    

    this would launch the fancybox with as many images as you put in the array