Opened 14 years ago
Closed 14 years ago
#3407 closed bug (invalid)
Multiple :gr do not work as expected
Reported by: | greggreenhaw | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | selector | Version: | 1.2.6 |
Keywords: | gt:, selctors | Cc: | |
Blocked by: | Blocking: |
Description
running this: $('table tr:gt(1) td:gt(2)').css('background-color','white');
on a table will skip on the first 2 columns on the first row and not on each additional row.
Change History (3)
comment:1 Changed 14 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 Changed 14 years ago by
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
I disagree since its in the selector, I think it should scoped in the context of the parent "tr" selector, thus for each row greater than 1 cells greater than 2, for each row. Otherwise I would just do an array _slice or someting or a simple filter as a nested function.
comment:3 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
Scott's right. Perhaps you wanted something like :not(:first-child)
instead?
Note: See
TracTickets for help on using
tickets.
This is the correct behavior. The selector says find all tables, then fine all rows, and limit to everything after the first row, then find all data cells and limit to everything after the first two cells.
To accomplish what you want, you need to do: