Hi Team Kriesi,
i was looking for a script, which just removes the tooltip on hover, but not the caption in the lightbox. Found something
function custom_remove_tooltip_script() {
?>
<script>
(function($){
$("*").hover(function(){
$(this).removeAttr("title");
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'custom_remove_tooltip_script');
funny situation, works fine, just the 1. image in every gallery (easyslider, gallery, masonry), which opens in the lightbox, has no captions at all.
can you use instead:
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');
works perfect, thank you guys and gals.
always a pleasure to learn from you.