Hi there,
For some reason I can’t get rid of the tooltip that shows up when I hover over the images in my masonry galleries. I tried both codes below but nothing seems to work. What am I missing?
jQuery(document).ready(function($){
jQuery('img').removeAttr('title');
});
(addes to avia.js)
add_action(‘remove_masonry_tooltip’);
function remove_masonry_tooltip(){
?>
<script>
jQuery(window).load(function(){
jQuery(‘.av-masonry-container a, .av-masonry-container img’).removeAttr(‘title’);
});
</script>
<?php
}
(added to functions.php)
Hope you can help me out here.
Thanks and kind regards,
Charlotte
Hey Boulanger!
Please use following code in Functions.php file instead
function add_custom_tooltip(){
?>
<script>
jQuery(window).load(function(){
jQuery('a').removeAttr('title');
jQuery('img').removeAttr('title');
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_tooltip');
Cheers!
Yigit
Hi Yigit,
The tooltip still shows. I did empty Cache. Could it be the ‘alt’ text that’s still there?
Cheers!
Charlotte
Hey!
Functions.php file of your child theme is not working. I added the code to parent theme file and it worked fine.
Please re-install child theme using pre-built version that you can download from here – http://kriesi.at/documentation/enfold/downloads/
Best regards,
Yigit
Yes! That did the job.
Many thanks!
Charlotte