Bug Tracker

Modify

Ticket #368 (closed bug: wontfix)

Opened 7 years ago

Last modified 6 years ago

attribute selector not working in IE6 in jQuery 1.0.3

Reported by: tdeater@… Owned by:
Priority: major Milestone:
Component: core Version:
Keywords: Cc:
Blocking: Blocked by:

Description

Using this selector to find null links in my #nav container:

$("#nav a[@href='#']")

This works fine for all tested browsers using the 2006-08-31 (rev 249) release of jQuery.

In the 1.0.3 release however, IE selects zero elements. Firefox 1.5 works correctly still.

Change History

comment:1 Changed 7 years ago by brandon

  • Status changed from new to closed
  • Resolution set to wontfix

This is caused by IE messing with the attribute value when using getAttribute on the a tag's href attribute. Instead please use:

$("#nav a[@href$='#'");

See  http://jquery.com/docs/Base/Expression/CSS/ for more info on this selector.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.