Thank you Mike,

Another question: i want to disable the submit event of the form, yet my code 
doesn't work "form.unbind is not a function"

var $this = jQuery(this);
var form = $this[0].form;
form.unbind("submit");


Thanks a lot!

alexandre

-----Original Message-----
From: Mike Alsup [mailto:[EMAIL PROTECTED] 
Sent: jeudi 8 février 2007 2:57
To: [EMAIL PROTECTED]; jQuery Discussion.
Subject: Re: [jQuery] question about selectors

> say i have an input, how can i reach its containing form element ?

Hi Alexandre,

All form elements have a 'form' property so if you have a ref to the input 
element you can just do this:

var form = myInput.form;

Or to use jQuery:

var form = $('#myInput')[0].form;

Mike

-- 
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/

Reply via email to