I am currently working with the Galleria js Slider.
I need callback to event when a user tries to view slide images 6>
I want to bar users from seeing slide 6 and above and display a popup when he clicks on 6> thumbnails or the forward arrow.
Apologies for my poor Engish.
Can anyone help. Thanks in advance.
I've tried
var gallery = Galleria.get(0);
gallery.bind("loadfinish", function(e) {
if (e.index > 5) {
myCallback();
return false; // Here I need to prevent image showing
}
});
Solution:
var selector = '#galleria-1';
Galleria.run(selector);
$(selector).data('galleria').bind('loadfinish', function(e) {
if(e.index > 4) { // > the fifth image
$(selector +' .galleria-image img').css('opacity', 0);
this.show( 0 );
myCallback();
}
})