Say "Hello!"

  • This field is for validation purposes and should be left unchanged.

Give unique rel tags to multiple galleries of images on the same page – fancybox


1
2
3
4
5
6
//give unique gallery # to groups of images for fancybox
jQuery('.gallery').each(function (g) {
    $('a', this).attr('rel', function (i, attr) {
        return attr + ' gallery-' + g;
    });
});

Back to Snippets Follow me on GitHub

Ashley Cameron logo
Blog