Hide title attribute on hover, but don’t remove

3 Comments

  1. Emil

    and this ?
    $( \”a\” ).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\",\"\");
     }, function() {
        // Retrieve the title from the temporary attribute
        var title = $(this).attr(\"tmp_title\");
    
        // Return the title to what it was
        $(this).attr(\"title\", title);
     }
    

    );

  2. This was a much needed workaround, and really smooth.
    I changed it to be on(mouseover) and on (mouseleave) to fire the functions.

    Well done.

    1. Glad you found it useful Ryan. Cheers!

Leave a Reply to Emil Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.