Files
creator-child/js/featherlight.js
Bruno Pesenti 6df0f90b09 Single v1
-commentaires cachés
-settings
-3 lightbox
-enqueue js et css
2017-01-16 06:32:13 +01:00

28 lines
671 B
JavaScript

$(document).ready(function(){
$('.gallery').featherlightGallery({
gallery: {
fadeIn: 300,
fadeOut: 300
},
openSpeed: 300,
closeSpeed: 300
});
$('.gallery2').featherlightGallery({
gallery: {
next: 'next »',
previous: '« previous'
},
variant: 'featherlight-gallery2'
});
// Ajoute le alt de <img src"" alt"" /> sous l'image
$.featherlightGallery.prototype.afterContent = function() {
var caption = this.$currentTarget.find('img').attr('alt');
this.$instance.find('.featherlight-caption').remove();
$('<div class="featherlight-caption">').text(caption).appendTo(this.$instance.find('.featherlight-content'));
};
});