[jQuery] Selecting individual Elements with $()
A previous question I asked had this answer:
$('#YourField').val() returns the value.
<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
andy@icglink.com
615.370.1530 x737
--------------//--------->
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com]On
Behalf Of floepi
Sent: Thursday, June 29, 2006 10:33 AM
To: discuss@jquery.com
Subject: [jQuery] Selecting individual Elements with $()
Hi there,
i was wondering if there is a nicer way to select one single element in
jQuery ala prototype
$('testid').value
for example gives me the value. I understand jQuery gets always a Object
Wrapper so
$('#testid').get(0).value
would give me the same as the protoype $() function. But since i use # to
just get that id could i then not get the element instead of the object
wrapper. I explicitly tell jquery i just want one object with that id so it
might give me back that object..
$('#testid').value is so much nicer than defining it with get(0)
I guess i am just doing something wrong.
any help appreciated.
Cheers
Phil
--
View this message in context:
http://www.nabble.com/Selecting-individual-Elements-with-%24%28%29-tf1868118
.html#a5104909
Sent from the JQuery forum at Nabble.com.
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/