
-
AuthorPosts
-
October 28, 2019 at 11:52 pm #1151957
On my masonry element on the front end when I rollover and image a small box appears with some text. How do I remove these?
October 30, 2019 at 2:03 pm #1152328Hey arallon,
Those are browser default when the element contains a title.
To remove it, add this code in functions.php (preferrably on a child theme):function remove_custom_tooltip(){ ?> <script> jQuery(window).load(function(){ jQuery('.av-masonry-image-container').removeAttr('title'); }); </script> <?php } add_action('wp_footer', 'remove_custom_tooltip');
Hope it helps.
Best regards,
NikkoOctober 30, 2019 at 7:29 pm #1152487Thanks for that Nikko, it did not seem to take away that pop up text though…I have cleared the cache several time and have also tried on several browsers and the pop of text still show up. Please Advise
November 2, 2019 at 7:05 pm #1153339Hi,
Sorry for the late reply, Try adding this code to the end of your functions.php file in Appearance > Editor:function remove_custom_tooltip(){ ?> <script> jQuery(window).load(function(){ jQuery('.av-masonry-entry').removeAttr('title'); }); </script> <?php } add_action('wp_footer', 'remove_custom_tooltip');
Best regards,
MikeNovember 4, 2019 at 7:48 pm #1153750Hi Mike, I added that code but the rollovers still happen. I have tried clearing the cache and several browsers…I attached some login credentials just in case.
November 5, 2019 at 12:19 pm #1153970Hi,
Thanks for the login, but it doesn’t seem to be an admin account so I can’t adjust the script. Please replace the above script with this:function remove_tooltip_title(){ ?> <script> jQuery(window).load(function(){ jQuery('.av-masonry-image-container').removeAttr('title'); }); </script> <?php } add_action('wp_footer', 'remove_tooltip_title');
Then check again
Best regards,
MikeNovember 5, 2019 at 5:41 pm #1154034Hi Mike, Sorry I just updated that account as an admin, so feel free to login! I tried adding that code but the rollover still shows…
November 6, 2019 at 1:27 pm #1154284Hi,
Thank you for the admin access, so the issue was that the title was being added twice by to different elements, here is the updated code that I added to solve:function remove_tooltip_title(){ ?> <script> jQuery(window).load(function(){ jQuery('.av-masonry-entry').removeAttr('title'); jQuery('.av-masonry-image-container').removeAttr('title'); }); </script> <?php } add_action('wp_footer', 'remove_tooltip_title');
Please clear your browser cache and check.
Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.