This is a known issue with IE. The name and id attribute share the same namespace. I think a fix for this would greatly decrease the performance of selecting by ID in IE.
None-the-less could you post this over on the dev list? http://jquery.com/mailman/listinfo/dev_jquery.com -- Brandon Aaron On 2/19/07, Brice Burgess <[EMAIL PROTECTED]> wrote: > While implementing Interface Sliders, I learned that under IE6/7 jQuery > 1.1.1's ID selector ($('#uniqueID')) will return either an element with > ID of "uniqueID" or an element with a NAME of "uniqueID" -- whichever > comes first. > > Firefox in unaffected, returning ONLY the element with ID of "uniqueID" > (if found) -- the expected behavior. > > This looks to be a reported; http://dev.jquery.com/ticket/951 although > the ticket incorrectly limits the scope to anchor tags. Here is an > example using <input>; > --- > <form> > <input type="hidden" id="vmps" name="mps"></input> > <div id="mps"></div> > </form> > > <script type="text/javascript"> > $().ready(function(){ > $('#mps').append('#mps selector worked <br />'); > $('form div').append('form>div selector worked <br />'); > }); > </script> > --- > This will result in a script error in IE, as you can't call $.append() > on an input. > > The point is; it should be calling $.append on <div id="mps"> ... (as FF > & Opera do). > > ~ Brice > > > > _______________________________________________ > jQuery mailing list > [email protected] > http://jquery.com/discuss/ > _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
