Bug Tracker

Modify

Ticket #6089 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

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

test.html Download (771 bytes) - added by alexn 3 years ago.

Change History

Changed 3 years ago by alexn

comment:1 Changed 3 years ago by john

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

I think you perhaps meant to do [value*=Contains].

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.