How to find the submit button in a specific form in jQuery
The following should work:
var submit = curElement.closest('form').find(':submit');
This should work:
var curSubmit = $("input[type=submit]",curForm);
EDIT: Note the missing '
in the selector
Using plain javascript (without relying on jquery):
var curSubmit = curForm.querySelector('button[type="submit"]');