-
AuthorPosts
-
June 16, 2022 at 4:41 pm #1355521
On a page, I have a full width slider with different images. I disabled the showing of title, description and so on. But, when I place my mouse/cursor on the image, then a small label appears with the information in the title tag in it. I want to hide this label, but can’t find where to do that.
Here an example:
June 17, 2022 at 12:04 am #1355549if these are only images that are not meant to be opend in a lightbox – you can simply remove the titles of the images.
This is not an enfold setting – it is simple browser behavior to show after a while the title on hovering.
just put it in the child-theme functions.php:function remove_title_attr(){ ?> <script> (function($) { $(window).on('load', function(){ $('*[title]').removeAttr('title'); }); })(jQuery); </script> <?php } add_action('wp_footer', 'remove_title_attr');__________
If you need the title for lightbox bottom-bar description – use instead:
function temporary_removal_title_tags(){ ?> <script> window.onload = function() { var links = document.querySelectorAll('a,img,div[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');June 17, 2022 at 9:35 am #1355562June 17, 2022 at 9:51 am #1355563Thanks a lot! I thought it was may be an Enfold-setting, but you’re correct. Thanks for helping me out!
June 18, 2022 at 4:51 am #1355659Hi,
Glad Guenni007 could 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.
Thanks Guenni007 for sharing.Best regards,
Mike -
AuthorPosts
- The topic ‘Hide "title" on mouseover in avia_sc_slider_full (fullwidth image slider)’ is closed to new replies.
