nth-child + class does not work in Firefox 5
|Reported by:||Cardgage||Owned by:|
This selector is meant to select all the cells in the 8th column which have a class of "valueCell".
$("#dataTable tbody td:nth-child(8).valueCell")
Most browsers behave as expected, returning the cells that are in the 8th column and that have the specified class. In Firefox 5, however, it appears to be trying to select the 8th of those cells in the row which have the "valueCell" class. So if some of the cells do not have the class, they are not counted.
This works as expected in:
- Safari 5.0.3
- IE 9
- Opera 11.11
- Chrome 12.0.742.100.
It does not work as expected in:
- Firefox 5.
I did not test Firefox 4.
Here is a working demo of the problem on jsFiddle: http://jsfiddle.net/5dDTP/
I was able to duplicate this problem on the following versions of jQuery:
The expected behavior occurs in Firefox 5 when using jQuery version 1.2.6
Operating system: Windows 7