Hello
Is it a possibility to add custom CSS to hide image title on hover ?
I have no child theme but some custom CSS in WordPress (saved for update theme)
Thank you
Hey Renaud,
If you are not using a child theme you could use the WP Code plugin then add a new snippet, in the top right corner use the PHP snippet as the code type:
and ensure that it is activated, then add this code and save.
function custom_script() { ?>
<script>
(function($){
$('img').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'));
});
$('a').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', 'custom_script', 99 );
Best regards,
Mike