JSFiddle - React, Tailwind, and code Playground

by Sethu raman

HTML

<a class="dep_buttons" href="#"> something text something text something text something text something text something text </a>

JavaScript

$(function () {
    $('.dep_buttons').each(function () {
            var stringText = $(this).text().trim();
            var substringText=stringText.substring(stringText,35);
            var remainingText=stringText.substr(35);
        $(this).html(substringText);
         $('.dep_buttons').mouseover(function () { 
                $(this).find('a').show();
          }).mouseout(function(){
                $(this).find('a').hide();
            });
        
        $('<a style="display:none;">'+remainingText+'                 </a>').appendTo($(this));
        });
});