mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-10 02:18:48 +00:00
Added ALT and TITLE of original IMG to fancybox popup.
This commit is contained in:
parent
4cdd24c871
commit
f8295635c1
3 changed files with 17 additions and 1 deletions
|
@ -2,4 +2,12 @@ $(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') );
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue