jqueryfancybox

how to open fancybox gallery with button helpers "manually"


I do not want to show any thumbnails on the page. I just want a text link that opens up a sequence of images that they can play in a slideshow. I'm using jQuery and Fancybox 2. I pasted this together from some examples I found, but instead of showing me the images, it shows me the text of the img src.

The HTML:

<a href="javascript:;" class="img_seq">Gallery</a>

js:       

    
$('.img_seq').click(function() {
    $.fancybox(['http://farm5.static.flickr.com/4044/4286199901_33844563eb.jpg',
         'http://farm3.static.flickr.com/2687/4220681515_cc4f42d6b9.jpg'],
        {   
        
    helpers: { 
        buttons : {}
    }
        
        });
});

Solution

  • easy:

    $(".img_seq").click(function() {
            $.fancybox([
                'http://farm5.static.flickr.com/4044/4286199901_33844563eb.jpg',
                'http://farm3.static.flickr.com/2687/4220681515_cc4f42d6b9.jpg',
                {
                    'href'  : 'http://farm5.static.flickr.com/4005/4213562882_851e92f326.jpg',
                    'title' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit'
                }
            ], {
                'padding'           : 0,
                'transitionIn'      : 'none',
                'transitionOut'     : 'none',
                'type'              : 'image',
                'changeFade'        : 0
            });
        });
    

    source: Fancybox.net