Modify ↓
Ticket #6089 (closed bug: invalid)
Next Siblings (“prev ~ siblings”) and :contains() Selectors
| Reported by: | alexn | Owned by: | |
|---|---|---|---|
| Priority: | Milestone: | 1.4.2 | |
| Component: | selector | Version: | 1.4.1 |
| Keywords: | :contains | Cc: | |
| Blocking: | Blocked by: |
Description
$('#divID1 ~ #divID2 button').length returns 2 elements as expected, but $("#divID1 ~ #divID2 button:contains('Second')").length returns 0 elements, which is not correct - it should return 1 button element with the 'Second' text.
Tested in Google Chrome 4.0, jQuery 1.4.1
Example:
<div>
<div id="divID1">Some text</div>
<div id="divID2">
<button type="button">First</button>
<button type="button">Second</button>
</div>
</div>
Attachments
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

