I have this underscore template to add and delete row :
<#
jQuery( document ).ready( function() {
jQuery( '.add-ingr' ).click( function() {
jQuery( '#re-ingr .ingr' ).append( '<div><input
type="text" name="ingr[]" value=""/><a href="#"
class="remove_field" style="margin-left:10px;">Remove</a><div>');
});
jQuery( '.remove_field' ).on("click", function(e){
e.preventDefault(); jQuery(this).parent('div').remove();
});
});
#>
the add row with remove link works , it generates the good html output:
<div><input type="text" name="ingredients[]" value=""><a href="#"
class="remove_field" style="margin-left:10px;">Remove</a><div></div>
</div>
But not the remove , nothing happen when i click on the remove hyperlink Any idea pls