139
rated 0 times
[
145]
[
6]
/ answers: 1 / hits: 112091
/ 14 Years ago, sun, may 23, 2010, 12:00:00
I try to get jQuery object of a submit button in a specific form (there are several forms on the same page).
I managed to get the form element itself. It looks something like this:
var curForm = curElement.parents(form);
The current Element has the context HTMLInputElement. The several techniques I tried to get the according submit element of the form:
var curSubmit = curForm.find(input[type='submit']);
var curSubmit = $(curForm).find(input[type='submit']);
var curSubmit = curForm.find(:submit);
var curSubmit = $(curForm).find(:submit);
var curSubmit = $(curSubmit, input[type='submit']);
the result is always the same (and very strange). The result that I get is the same element as curElement.
So how can I get the right submit button?
More From » jquery