Thanks all for the replies. I think you are right. Probably safer to use selectors.
I guess it would be possible to iterate through all of the children of the containing node to find the first node with that id.... but I guess that's quite expensive. On Apr 15, 12:12 am, keif <[email protected]> wrote: > Dimitar: > You're right to an extent. > > For example, if you have: > > <meta name="description"/> > <ul id="description"> > > $('description') in IE will grab the meta tag. > > -kb > > On Apr 14, 6:31 am, Dimitar Christoff <[email protected]> wrote: > > > > I am not sure if (1) is a big deal since they are treated as strings. i > > > oh, i thought it mattered for IE, the rule of thumb is to steer clear of > > ids like name, description, title etc. > > > for instance, <textarea name="description" id="description"></textarea> > > in a doc with a <meta name="description" >, > > document.getElementById("description") won't reference the textarea in > > IE, if i remember correctly. > > > hth, > > Dimitar
