How can I make a button add an input field when clicked, and then turn into another button or element once the input is submitted?
<button>add tag</button>
<input type="text" name="" placeholder="tag">
$(document).ready(function () {
$('button').click(function () {
$("button").before("input");
});
});