JSFiddle - React, Tailwind, and code Playground

by nukeboy212

HTML

<div id = "YourcommentSection">
<input id = "commentinput73" value = 'test'>
</div>
<div style = "commentSection">
<input id = "test" value ="test1">
</div>
<button id = "sub">
sub
</button>

JavaScript

$('#test').hide();
$('#sub').click(function(){
$("#YourcommentSection").empty();
var input = document.getElementById("test")
input.setAttribute("id", "commentinput73");
$('#commentinput73').show();
})