I'm trying to remove a dynamically appended element, but it seems that the class function attached for this element is not read.
I can click on + button and add new elements, but I can't delete when clicking on "-" button.
<div id="dftenglist">
<label for="dtfeng">Name:</label><input type="text" class="dfteng">
<button id="plusdfteng">+</button>
</div>
$("#plusdfteng").click(function() {
$("#dftenglist").append('<br><span><label for "a">Name:</label><input type="text" class="dfteng"> <button class="minusbtn">-</button></span>');
});
$(".minusbtn").click(function() {
$(this).parent().remove();
})
http://jsfiddle.net/0uv4k5bz/1/
Thanks, Alex
inside the – Alex Palombo Oct 08 '14 at 11:53