Hi,
my problem is the following:
I removed the title attribute according to your documentation (https://kriesi.at/documentation/enfold/image/#remove-image-alt-title-on-hover) , to avoid showing the title on hover.
But in the lightbox I’d like to have an image caption (which is normally the title).
Is there a possibility to remove only “normal” image titles but not the one’s from the lightbox?
Thanks for help.
Best regards,
Vera
you can use instead this snippet to remove the titles:
function temporary_removal_title_tags(){
?>
<script>
window.onload = function() {
var links = document.querySelectorAll('a, img, *[title]');
for (var i = 0; i < links.length; i++) {
var link = links[i];
link.onmouseover = function() {
this.setAttribute("data-tooltip", this.title);
this.title = "";
};
link.onmouseout = function() {
this.title = this.getAttribute("data-tooltip");
};
link.onmousedown = function() {
this.title = this.getAttribute("data-tooltip");
};
}
};
</script>
<?php
}
add_action('wp_footer', 'temporary_removal_title_tags');
but a lot of enfold elements have a choice for showing instead of the title f.e. the description.
Hi Guenni007,
thank you for your immediate reply.
That works fine.
Best regards,
Vera