jQuery selector for every row except the first on every table except first -
I want to apply the correct alignment on the last cell of each table row, leaving the first table on the page and leaving it first.
I wrote the following:
$ ("table: gt (0) tr: gt (0) td: last-child"). CSS ("text-align", "right");
- Tables well after being selected first.
- The last cell in each row is aligned in the right. good.
- The first row in the first table is omitted in the result set. good.
- The result is the style applied to each row in subsequent tables in BAD.
I have tried to pass the function to "each" method on the wrapped set, but it is not working. Any ideas?
You were almost there.
$ ("Table: gt (0)"). ("Text: align", "right");
Otherwise, tr: gt (0) is always true Because jquery is looking at every tr, not in every tr in each table.
Comments
Post a Comment