Opened 11 years ago
Closed 11 years ago
#11433 closed bug (invalid)
Selecting by class and attribute without tag name
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | selector | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
This
$('td.points[data-points=11.5]')
works fine. This doesn't
$('.points[data-points=11.5]') Error: Syntax error, unrecognized expression: [data-points=11.5]
tried in page and in Chrome console. Why would it be necessary to provide tag name? I believe this is a bug. http://jsfiddle.net/4D5HL/12/
Change History (1)
comment:1 Changed 11 years ago by
Component: | unfiled → selector |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
From the attribute selector docs:
You either need to quote it or escape the dot in the attribute value.
Example: [data-points="11.5"] or [data-points=11\.5] The former is preferred.