Single v1
-commentaires cachés -settings -3 lightbox -enqueue js et css
This commit is contained in:
27
js/featherlight.js
Normal file
27
js/featherlight.js
Normal file
@@ -0,0 +1,27 @@
|
||||
$(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'));
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user