When i click button, i want to add new note to my db.So when i click add_note button, a textbox and save button appears. When i click save button nothing change. I check the web concole but there is no error . What should i do ?
jquery
$("#add_note").each(function() {
$(this).on("click", function() {
$("#not").html('<input type="text" id="note" />');
$("#buton").html('<button class="btn btn-primary btn-sm " id="save">Save</button>');
});
});
$("#save").each(function() {
$(this).on("click", function() {
alert("dsfasdfasdfasd");
});
});
html
<td id="not"></td>
<td id="buton">
<button class="btn btn-primary btn-sm " id="add_note"> Add New Note</button>
</td>