Ahh, I just asumed he wanted zebra striped rows, didn't really pay
attention to the thread title.
brian wrote:
Using children() would be better than find() but your suggestion would
skip every other row.
$('#your_table_id tr').children('td:odd').css('background-color', '#EEE');
Better, agai
Using children() would be better than find() but your suggestion would
skip every other row.
$('#your_table_id tr').children('td:odd').css('background-color', '#EEE');
Better, again:
$('#your_table_id tr').children('td:odd').addClass('SomeClassName');
On Mon, Jan 19, 2009 at 10:55 AM, Liam Pot
$('#your_table_id tr:odd').children('td').css('background-color', '#EEE');
brian wrote:
$('#your_table_id tr').find('td:odd').css('background-color', '#EEE');
You need to operate on each TR separately or jQuery will count each TD
without regard for the row it's in.
On Sun, Jan 18, 2009 at 1
$('tr td:nth-child(2n)').css('background', '#ccc') // even column highlited
$('tr td:nth-child(2n-1)').css('background', '#ccc') // odd column highlited
MaurĂcio
-Mensagem Original-
De:
Para: "jQuery (English)"
Enviada em: segunda-feira, 19 de janeiro de 2009 01:32
Assunto: [jQuery
$('#your_table_id tr').find('td:odd').css('background-color', '#EEE');
You need to operate on each TR separately or jQuery will count each TD
without regard for the row it's in.
On Sun, Jan 18, 2009 at 10:32 PM, wrote:
>
> I have table which need to have alternate column highlight and work in
5 matches
Mail list logo