I'm using the plugin (jQuery.Lazy ();) to load my images.
LINK: link
It has this callback:
// called after an element was successfully handled
afterLoad: function(element) {
var imageSrc = element.data('src');
console.log('image "' + imageSrc + '" was loaded successfully');
},
What I want to do is call a sharing bar, after each image is uploaded, I'm using Globo.com's share-bar staff ( link )
But I can not load it there ..
I even imported it with .html(<div class="share-bar"...)
. It loads but is not displayed.
Can someone give me a light?
I came to test this:
afterLoad: function(element) {
var imageSrc = element.data('src');
new ShareBar({
'selector': '.share-nn',
'buttonWidth': 24,
'buttonPadding': 2,
'networks': [
'facebook',
'twitter',
'whatsapp',
'google',
'email'
]
});
}
But he created, in each image, the same amount of bars according to the amount of images, type, 10 images, in each he created 10 bars.