On Sep 26, 9:21 am, MorningZ <[EMAIL PROTECTED]> wrote:
> Well, your W3C specifications none the less,

Not mine, the W3C's.

> when you get a <select>
> element by a jQuery selector,

If you had quoted properly it would be clear that I was replying to
your use of getElementById and the inference that the
HTMLSelectElement's length property wasn't appropriate.  It is, and is
equivalent to its options properties length property.

> you have a wrapper around the <select>
> (ie/ parent) element itself, and as you are finding out,
> "length" (http://docs.jquery.com/Core/length) or it's equivalent
> "size" will return 1 because that's all it has in the collection

That is, $(id).length returns the value of the length property of the
jQuery object, not the length property of the DOM element selected by
the id.


> you have to select it's children like

You don't *have* to, you can get a reference to the select element and
go from there:

  $('#...').get(0).length;


--
Rob

Reply via email to