Ok I think that may answer the next question.
Are you saying that an assertion:
  $(this)[0] == this
will always be true?

In other words, if I am using ID selectors and want to access a DOM
property/method should I read the first element or can I just use the
jQuery:
  $("#myDiv").selectedIndex;

or should it always be one of:
  $("#myDiv").get(0).selectedIndex;
  $("#myDiv")[0].selectedIndex;

Sorry for the thread hijack ;-)


On 3/26/07, Klaus Hartl <[EMAIL PROTECTED]> wrote:

Dan G. Switzer, II schrieb:
> Rob,
>
>> I thought a jQuery object consisted of extended DOM objects - i.e. all
DOM
>> methods and properties are available, plus the jQuery extensions.
>
> To get to the actual DOM element, you'd use:
>
> alert( $(this).get(0).selectedIndex );
>
> -- or --
>
> alert( $(this)[0].selectedIndex );


Just to remember:

$(this)[0] == this

Wrapping a jQuery around the element to immediatly get it out there is a
little over the top most of the time ;-)


-- Klaus



_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/




--
Rob Desbois
Eml: [EMAIL PROTECTED]
Tel: 01452 760631
Mob: 07946 705987
"There's a whale there's a whale there's a whale fish" he cried, and the
whale was in full view.
...Then ooh welcome. Ahhh. Ooh mug welcome.
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to