Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
November 22, 2022 at 4:37 pm #1373546
Hello, I’d like to remove the tooltip, titles showing up on hover for all of the images on my website. I’ve already tried the solutions found on the following three links and they don’t work.
Thanks,
Jacob
November 22, 2022 at 8:27 pm #1373566Hey Hurricane,
Thank you for the link to your site, Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:function hide_title_attribute_on_hover() { ?> <script> window.addEventListener('DOMContentLoaded', function() { (function($){ $('a').hover(function(e){ $(this).attr('data-title', $(this).attr('title')); $(this).removeAttr('title'); }, function(e){ $(this).attr('title', $(this).attr('data-title')); }); $('img').hover(function(e){ $(this).attr('data-title', $(this).attr('title')); $(this).removeAttr('title'); }, function(e){ $(this).attr('title', $(this).attr('data-title')); }); $('a.av-masonry-entry').hover(function(e){ $(this).attr('data-title', $(this).attr('title')); $(this).removeAttr('title'); }, function(e){ $(this).attr('title', $(this).attr('data-title')); }); $('.av-masonry-image-container').hover(function(e){ $(this).attr('data-title', $(this).attr('title')); $(this).removeAttr('title'); }, function(e){ $(this).attr('title', $(this).attr('data-title')); }); })(jQuery); }); </script> <?php } add_action('wp_footer', 'hide_title_attribute_on_hover');This code it based on some shared by Guenni007 thanks 🙂.
Best regards,
MikeNovember 22, 2022 at 8:33 pm #1373568Thanks! That seems to have done the trick.
November 23, 2022 at 1:01 am #1373583Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- The topic ‘Removing/hiding alt titles of all images’ is closed to new replies.
