Hide character in jquery

jquery

Solution

Demo FIDDLE

Jquery

    $(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));
        });
});

Problem

I need hide character after 35 and when I hover text show full text help me ``` <a class="dep_buttons" href="#"> something text something text something text something text something text something text </a> $('.dep_buttons').mouseover(function () { if($(this).text().length > 30) { $(this).stop().animate({height:"150px"},150); } }) $(".dep_buttons").mouseout(function(){ $(this).stop().animate({height:"40px"},150); }); ```

Original source