jquery get form id by input id
Posted
by Mikk
on Stack Overflow
See other posts from Stack Overflow
or by Mikk
Published on 2010-03-28T12:08:19Z
Indexed on
2010/03/28
12:13 UTC
Read the original article
Hit count: 229
Hi,
I have really basic question. How can I get form id by input element id.
<form id="my_form">
<fieldset>
<!--some <div>'s-->
<input id="my_input"></div>
<!--some <div>'s end-->
</fieldset>
</form>
Now if I have
var form_input = $('#my_input');
How can I get id "my_form"?
Thank you.
© Stack Overflow or respective owner