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");  
  1. Tables well after being selected first.
  2. The last cell in each row is aligned in the right. good.
  3. The first row in the first table is omitted in the result set. good.
  4. 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

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -