Site logo

Archived topic

Disable Title tooltips

1 reply · Started by Roberto Tarzia on August 5, 2020

Viewing posts 1–2 of 2

Hi, is there a way to disable the tooltips of the "a" tag?

On many links and images I get a tooltip that takes the title field, I would like to disable this tooltip without having to delete the title field. is there a way?

I found this code and tried adding it with element, but it doesn't work.


$(".element").hover(function(){

        // Get the current title
        var title = $(this).attr("title");

        // Store it in a temporary attribute
        $(this).attr("tmp_title", title);

        // Set the title to nothing so we don't see the tooltips
        $(this).attr("title","");
        
    });

  $(".element").click(function(){// Fired when we leave the element

        // Retrieve the title from the temporary attribute
        var title = $(this).attr("tmp_title");

        // Return the title to what it was
        $(this).attr("title", title);
        
    });
This archived topic is closed to new replies.