Merge pull request #1338 from brockhaus/2022.12-rc
Added ALT and TITLE of original IMG to fancybox popup.
This commit is contained in:
commit
f922d69310
|
@ -1,3 +1,11 @@
|
||||||
|
### Version 1.05
|
||||||
|
|
||||||
|
* Added ALT and TITLE of original IMG to fancybox popup.
|
||||||
|
|
||||||
|
### Version 1.04
|
||||||
|
|
||||||
|
* Update supporting upcoming imnagegrid in posts
|
||||||
|
|
||||||
### Version 1.03
|
### Version 1.03
|
||||||
|
|
||||||
* imgages in body-attach with title / alt attribute get them removed while adding fancy attributes
|
* imgages in body-attach with title / alt attribute get them removed while adding fancy attributes
|
||||||
|
|
|
@ -2,4 +2,12 @@ $(document).ready(function() {
|
||||||
$.fancybox.defaults.loop = "true";
|
$.fancybox.defaults.loop = "true";
|
||||||
// this disables the colorbox hook found in frio/js/modal.js:34
|
// this disables the colorbox hook found in frio/js/modal.js:34
|
||||||
$("body").off("click", ".wall-item-body a img");
|
$("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') );
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* Name: Fancybox
|
* Name: Fancybox
|
||||||
* Description: Open media attachments of posts into a fancybox overlay.
|
* Description: Open media attachments of posts into a fancybox overlay.
|
||||||
* Version: 1.04
|
* Version: 1.05
|
||||||
* Author: Grischa Brockhaus <grischa@brockha.us>
|
* Author: Grischa Brockhaus <grischa@brockha.us>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue