28 lines
671 B
JavaScript
28 lines
671 B
JavaScript
$(document).ready(function(){
|
|
|
|
$('.galerie').featherlightGallery({
|
|
gallery: {
|
|
fadeIn: 300,
|
|
fadeOut: 300
|
|
},
|
|
openSpeed: 300,
|
|
closeSpeed: 300
|
|
});
|
|
$('.galerie2').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'));
|
|
};
|
|
|
|
});
|
|
|