JSFiddle - React, Tailwind, and code Playground

by Santharam N R

HTML

<div class = "Input">
<textarea cols="10" row="10" name="add" style="resize:none" id ="text0"> </textarea>
<span class="Delete" style="visibility:hidden"> Del </span>
</div>

<button class="AddText">addtext</button>

JavaScript

var count=0;
 $('.AddText').on('click',function(e){
        $('.Input:last').after($('.Input:first').clone());
    $('.Input:last textarea').attr('id','text'+((count)+1));
     count=count+1;
});