JSFiddle - React, Tailwind, and code Playground

HTML

<html>
<body>
    <a href="#" title="This is the title text">This is the default text</a>
</body>
</html>

JavaScript

// jQuery Plugin
(function($){

    // Swap text with title attribute
    $.fn.swapTitleAttr = function() {
    
        var title = this.attr('title');
        var text  = this.text(); 
        
        $(this).hover(function(){
            $(this).text(title);
        },function(){
            $(this).text(text);
        });
    };
    
})(jQuery);


$(document).ready(function(){
    $('a').swapTitleAttr();
});