JSFiddle - React, Tailwind, and code Playground
by swoogie
HTML
<button id="button">Add Note...</button>
<div id="wrapperDiv">
</div>
CSS
textarea{
width:400px;
height:200px;
}
JavaScript
$("#wrapperDiv").on('blur', "#ta", function(){
console.log($(this).parent());
$(this).parent().text($(this).val());
});
$("#button").on("click", function(){
var newHTML = "<textarea id='ta'>" + $("div").text() + "</textarea>";
$("div").html(newHTML);
});