Opened 12 years ago
Closed 12 years ago
#8264 closed bug (invalid)
parent child selector does not work for table
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | selector | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hello,
I am evaluating jQuery for my company. I found issue where parent child selector does not work for table. I placed table with class bold and have 6 rows with some data and I want to change background color of odd rows. Syntax I used is as below.
$('table.bold > tr:odd').css("background-color", "#bbbbff");
I tested this in chrome and IE 9.
Change History (1)
comment:1 Changed 12 years ago by
Component: | unfiled → selector |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Thanks for taking the time to contribute to the jQuery project by writing a bug report.
This isn't a bug in jQuery. Your selector must take into account that browsers may automatically insert a
tbody
element into yourtable
. Check http://jsfiddle.net/jitter/bYhnU/2/working example