Skip to main content

Bug Tracker

Side navigation

#8264 closed bug (invalid)

Opened February 13, 2011 11:51PM UTC

Closed February 14, 2011 12:20AM UTC

parent child selector does not work for table

Reported by: vedantdave01@gmail.com 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.

Attachments (0)
Change History (1)

Changed February 14, 2011 12:20AM UTC by jitter comment:1

component: unfiledselector
priority: undecidedlow
resolution: → invalid
status: newclosed

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 your table. Check http://jsfiddle.net/jitter/bYhnU/2/

working example