Bug Tracker

Opened 14 years ago

Closed 12 years ago

#4499 closed bug (invalid)

Not working attribute selectors in Chrome

Reported by: oluckyman Owned by: john
Priority: low Milestone: 1.next
Component: selector Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:


test HTML:



<a href="/test/url#test_hash" id="testa">test A</a>

<!-- including javascripts here -->



test javascript:


function init() { alert([

$('a[hash]').length, $('a[hash="#test_hash"]').length, $('a[hash=#test_hash]').length

]) } in Chrome displays: 0,0,1 in other browsers: 1,1,1

Change History (3)

comment:1 Changed 12 years ago by Rick Waldron

Priority: majorlow
Status: newopen

comment:2 Changed 12 years ago by addyosmani

Reconfirming rwaldron's test case is still failing in Chrome 12 for me.

comment:3 Changed 12 years ago by timmywil

Resolution: invalid
Status: openclosed

There are couple things off here. First, hash is a property and cannot be used in an attribute selector, so the correct result is 0,0,0. Second, you'll get 0,0,0 if #test_hash in the third selector is correctly quoted as is required in jQuery attribute selectors. Closing invalid.

Note: See TracTickets for help on using tickets.