JSFiddle - React, Tailwind, and code Playground

by Asif Sharif Shahid

HTML

<div>
<input type="text" name="txt" class="mytxt">
<input type="button" class="submmit"  value="Shoot">
</div>
  <div class="areaofcontent" style="width:68%;float:right; background-color:#eee;height:400px;overflow-y:scroll;">
    <div class="putbullet"></div>
  </div>

JavaScript

$(document).ready(function(){


$('.submmit').click(function(){
    //alert($(".mytxt").val());
    var c = "<div class='movethis' style='width: 40px;height: 50px;position: absolute;right: 0;'>" + $(".mytxt").val() + "</div><br/> ";
    $(".putbullet").append(c).animate({"left":"0px"}, "slow");
     $(".movethis").animate({
        "left": "245px"
      },
      "slow"
    );
	});
});