JSFiddle - React, Tailwind, and code Playground

HTML

<button type="submit" class="button" id="addk">Add div</button>
 <div class="body" style="float: left;">

JavaScript

var RL;
RL = 0;
$("#addk").click(function () {
       RL = RL + 1;
        RN = "Tekst" + RL;
         $("<div id='" + RN + "' class='we' > " +
          "<B>Kon" + RL +"</B>" +
           "<button type='submit' class='button'  onclick='Add(" + RN + ");' >AddNext</button>" +
           "<button type='submit' class='button'  onclick='Close(" + RN + ");' >Close</button>" +
           "<button type='submit' class='button' onclick='Up(" + RN + ");' >Up</button>" +
           "<button type='submit' class='button' onclick='Down(" + RN + ");' >Down</button><br />" +
           "<br />"  + "<input type='text'>" + "<br /><br />" + '</div>').
         
         appendTo(".body");
    });
function Close (){
 $("#" + body.id + "").hide();
}
function Up (we){
//??
}
function Up (we){
//?
}