Add Fancybox to the core

This commit is contained in:
Michael 2023-05-03 20:59:28 +00:00
parent 349fa08ece
commit b4b9a6a34a
14 changed files with 6681 additions and 32 deletions

View file

@ -0,0 +1,13 @@
$(document).ready(function() {
$.fancybox.defaults.loop = "true";
// this disables the colorbox hook found in frio/js/modal.js:34
$("body").off("click", ".wall-item-body a img");
// Adds ALT/TITLE text to fancybox
$('a[data-fancybox').fancybox({
afterLoad : function(instance, current) {
current.$image.attr('alt', current.opts.$orig.find('img').attr('alt') );
current.$image.attr('title', current.opts.$orig.find('img').attr('title') );
}
});
});