thank you Aaron.
 
In fact, what i'm trying to do, is to create a variable in case an element
exists. "undefined" will do :)

   _____  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Aaron Heimlich
Sent: jeudi 21 juin 2007 23:03
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery("form") returns what if no element found?


According to Firebug

typeof $('form').attr('action');

is "undefined" in both cases.

FYI: jQuery() returns and empty jQuery object when no elements match the
selector. If you try to call a method on an empty jQuery object, then
nothing will happen (because there is noting for jQuery to work with). 


On 6/21/07, Alexandre Plennevaux <HYPERLINK
"mailto:[EMAIL PROTECTED]"[EMAIL PROTECTED]> wrote: 

a quick question:
 
what does $("form").attr("action")  returns if there is no form , or if the
form has no action attribute ?  null ? undefined? 
 
 
thank you
 
Alexandre


Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.472 / Base de données virus: 269.9.1/857 - Date: 20/06/2007
14:18





-- 
Aaron Heimlich
Web Developer
HYPERLINK "mailto:[EMAIL PROTECTED]"[EMAIL PROTECTED]
HYPERLINK "http://aheimlich.freepgs.com"http://aheimlich.freepgs.com 

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.472 / Base de données virus: 269.9.1/857 - Date: 20/06/2007
14:18
 

Reply via email to