I have multiple forms on the same page with the class form_delete
.
How do I iterate over those forms in jQuery adding a submit
event that will uniquely apply to each form?
I've tried this using $('.form_delete').each(...);
but when I add $(this).submit(...)
events it's not working (event does not register).
Forms:
<form class="form_delete">
</form>
<form class="form_delete">
</form>
<form class="form_delete">keep adding n forms to infinity ;)
jQuery:
$('.form_delete').each(function() {
$(this).submit( function(event) {
// Nothing gets registered here
});
}