JSFiddle - React, Tailwind, and code Playground

by Vipin Patil

HTML

<DIV style="position:absolute;right:-150px;top:20px; width:200px" id="a1">
    <div id="a2">
    Click to Slide 
    </div>
    <div id="a2">
    sdjh sjhfg jhsgfshjg shjfsdg sd
    sdf sdjfhgf sdjf dsfs
    sdfdsj fsdgjfhds gfjdsf ds
    sd fdsfds fds
    </div>
</DIV>

CSS

#a2,#a3
{
    position:relative;
 float:left;
 clear:none;   
    border:solid 1px red;
}
#a2{width:50px;}
#a3{width:200px;}
#a1{width:225px;position:absolute;}

JavaScript

$(function() {
    $("#a2").toggle(function(){

$("#a1").animate({right: "200"},3000)},
    function(){

$("#a1").animate({right: "20"},3000)}              
                    
                    );

    
});