jQuery-Galleriffic, set facebook like-button on every photo
<p>I implemented the tremendous [galleriffic][0] - jQuery plugin and would like to set a facebook-like button on every single picture.
Now I tried it in the onSlideChange()-function like this:</p>

<pre><code>$(".fb-like").attr("data-href","http://ulc.local/galerie/25#"+nextIndex);
</code></pre>

<p>but with no success. As soon as I click on one like button, all other buttons on the other pictures are also enabled.</p>

<p>Any help is much appreciated.</p>

<p>EDIT: Here is some more code:</p>

<pre><code> &lt;div id="gallery" class="content-image"&gt;  
            &lt;div class="border-left"&gt;&lt;/div&gt;  
            &lt;div class="slideshow-container"&gt;
                &lt;div id="loading" class="loader"&gt;&lt;/div&gt;
                &lt;div id="slideshow" class="slideshow"&gt;
                    &lt;div id="slide-container"&gt;
                        &lt;div id="slider"&gt;
                            &lt;div id="title"&gt;&lt;/div&gt;
                            &lt;div id="share"&gt;
                                &lt;div class="fb-like" data-send="false" data-layout="button_count" data-width="150" data-show-faces="true"&gt;&lt;/div&gt;
                                &lt;div id="spacer"&gt;&lt;/div&gt;
                                &lt;a href="https://twitter.com/share" class="twitter-share-button"  data-lang="en" data-count="none"&gt;&lt;/a&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="border-right"&gt;&lt;/div&gt;  
        &lt;/div&gt;
        &lt;div style="clear:both"&gt;&lt;/div&gt;  
</code></pre>

<p>The div with the class "fb-like" should display the button.
Now I tried to replace this div with this one in the onSlidechange():</p>

<pre><code>onSlideChange:function(prevIndex, nextIndex) {
        // 'this' refers to the gallery, which is an extension of $('#thumbs')
        this.find('ul.thumbs').children()
            .eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
            .eq(nextIndex).fadeTo('fast', 1.0);
        newUrl = "http://ulc.local/galerie/25/";
        $(".fb-like").replaceWith("&lt;div class='fb-like' data-href='http://ulc.local/galerie/25#' "+nextIndex+" data-send='false' data-layout='button_count' data-width='150' data-show-faces='true'&gt;&lt;/div&gt;");
    }
</code></pre>

<p>I thought to make several like-buttons, I change the data-href attribute as soon as the user clicks on the next image. Unfortunately, no button is shown.</p>
