Or to stay with jQuery objects:
 
$('type', line).eq(0).val()


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Blair McKenzie
Sent: Monday, September 25, 2006 7:53 PM
To: jQuery Discussion.
Subject: Re: [jQuery] Get attribute form $()

I don't know about the other stuff, but get() is the exception to the chaining rule - it's purpose is to provide access to the underlying element when necessary. Try
$("type",line).get(0).value

On 9/26/06, Donny Kurnia <[EMAIL PROTECTED]> wrote:
I've got this result while debugging with firebug:

>>> $("type",line)
[<type value="select">]
>>> $("type",line).attr("value")
--result nothing
>>> $("type",line).get(0)
<type value="select">
>>> $("type",line).get(0).attr("value")
--result nothing

How do I got the value attribute from $("type",line) without assign it
to another variable?
Why chainable method didn't work for $().get() ??

--
Donny Kurnia
http://hantulab.multiply.com/
http://hantulab.blogspot.com/
-------------------------------------------
At times the world can seem an unfriendly and sinister place. But
believe us when we say there is much more good in it than bad. And
what might seem to be a series of unfortunate events, may in fact, be
the first steps of a journey.
-- A Series of Unfortunate Events

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

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

Reply via email to