JSFiddle - React, Tailwind, and code Playground
by fruitcake20
HTML
<button id="btnPlus" type="button">+</button>
<button id="btnGet" type="button" style="width:20%;">Get </button>
<div class="input">
<input type="text" class='text-input'>
</div>
JavaScript
$("#btnPlus").click(function(){
add_field();
});
$("#btnGet").click(function(){
shout_content();
});
function add_field()
{
var clone = $(".text-input").clone();
clone.removeClass("text-input");
clone.appendTo(".input");
}
function shout_content()
{
$(".input").children("input").each(function(){
alert($(this).val());
});
}