Good morning,
I'm running into an issue where I want to trigger an event when the X for deleting an item in a collection is clicked. I have a simple collection with only one field in it, for testing purposes.
When I click "Add" the alert "test add" is displayed as expected. This happens as many times as I click it. However, when I click the X for deleting an item, only the "test remove" alert shows if I click on the first top item on the list. If I try to delete anything from the bottom or middle, I don't get the "test remove" triggered.
Is there something that I need to adjust to make it work so that it triggers the "test remove" alert from any X clicked?
$( document ).ready(function() { $('.cf-collection-append').click(function(){ alert('test add'); }); $('.cf-collection-delete').click(function(){ alert('test remove'); }); });
Thank you,
Raul Gonzalez