how can I create another comment in the printed value like as facebook comment.I want when the value will display after submitting under that value reply option will be show and when i click on reply the another input box will show, so that I would comment again on that printed value as like facebook. And I want the input value will clear after submitting.
can any one help me find this problem?
$(document).ready(function(){
$("#btn").click(function(){
let getVal = $("#inputValue").val();
let img = `<img src="https://images.unsplash.com/photo-1503023345310-bd7c1de61c7d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&w=1000&q=80" class="rounded-circle" height="30px" width="30px">`
$("#output").html($("#output").html() + " " + img + getVal + `<br>` );
});
});
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<!-- Popper JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<div id="main">
<div id="output"></div>
<input id="inputValue" type="text" name="text">
<button id="btn" class="btn btn-primary">display value</button>
</div>