SyntaxFix
Write A Post
Hire A Developer
Questions
I would suggest using closest, which selects the closest matching parent element:
closest
$('input[name="submitButton"]').closest("form");
Instead of filtering by the name, I would do this:
$('input[type=submit]').closest("form");