It uses document.getElementById("myId") as usual so it's a fast search, but
it will then check that the returned element is an input, so there is a
little additional overhead.

--rob

On 7/26/07, Remy Sharp <[EMAIL PROTECTED]> wrote:


I should really know this, but I've come to realise I'm not 100% sure.

Does this:

$('input#myId')

...search for all inputs first then narrow down to the ID, or does
jQuery work out before hand that "there can be only one" Id - and
therefore is the same, with respect to processing to:

$('#myId')

Cheers.

Remy.




--
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.

Reply via email to