You could do:

var form = $('#my-input').parents('form');

Or, form elements all have a 'form' property, so you could also do:

var form = $('#my-input')[0].form;

Cheers,
Luke

Alexandre Plennevaux wrote:
> A quick question:
>  
> say i have an input, how can i reach its containing form element ?
>  
> thanks :)
>  
> alexandre 
>  
> 
> --
> Ce message Envoi est certifié sans virus connu.
> Analyse effectuée par AVG.
> Version: 7.5.441 / Base de données virus: 268.17.29/673 - Date: 
> 6/02/2007 17:52
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to