0
I am using the plugin (jQuery.Lazy();) to load my images.
LINK: http://jquery.eisbehr.de/lazy/
She owns 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 intend to do is to call a sharing bar, after each image is loaded, I am using the share-bar of the Globo people.com (https://github.com/globocom/share-bar)
But I can’t carry her there.. .
I even cared about her .html(<div class="share-bar"...)
. It carries but is not displayed.
Someone can give me a light?
I even tested it:
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, like, 10 images, in each one he created 10 bars.
Where do you stand? What have you tried to do? So from scratch it’s hard to help :/
– Fábio
I edited the question with what I got to do and where I’m standing..
– D3rson
You have already tried to do so $(Function() { $('. your-image'). Lazy({ afterLoad... }) });
– Bruno Romualdo
is thus currently: http://prntscr.com/b55rtm
– D3rson