JSFiddle - React, Tailwind, and code Playground

by goldy

HTML

<br />
<br />
<br />
<div class="ft-small-twitter expand">sdsfsdfsf</div>

CSS

.ft-small-twitter{
    width:200px;
    height:30px;
   border:1px solid red;
   background:#124356;
    text-indent:30px;
    -webkit-box-sizing:border-box;
}

JavaScript

$(document).ready(function(){
    $('.ft-small-twitter').click(function(){
        if( $(this).hasClass('expand') ){
           $(this).animate({
                            'height':'+=30px'
                        }, 500, function(){
                            $(this).removeClass('expand');
                        });
        }
        else{
             $(this).animate({
                            'height':'-=30px'
                        }, 500, function(){
                            $(this).addClass('expand');
                        });
        }
        
    });
    
})