Galleriffic and multiple galleries on wordpress page

I think I’m close to figuring this out and would like some help to get this working properly. I am using dynamically generated IDs from WordPress Post ID numbers to create unique Galleriffic galleries. My script seems to be grabbing only one unique selector and not any other.

You can see the page here

Read More

Here is the galleriffic init code:

var galleryId = $('.gallery').attr('id');
var slideId = $('#'+galleryId+' > div');
var currentId = $('.thumbs_group').attr('id');
$('#'+galleryId).galleriffic('#'+currentId, {
    imageContainerSel: slideId
});

Again, this code is only affecting the first gallery and not the second gallery.

Any ideas would be appreciated. Thank you.

Related posts

Leave a Reply

1 comment

  1. you are only applying the function to one galleryID, try

    Updated code: replace all your code above with this:

    $('.gallery').each(function(){
       $(this).galleriffic($(this).next(), {
           imageContainerSel: $(this).find('.slideshow')
       }
    });