¿Cómo colorear columnas de tabla pares (o impares) utilizando jQuery? (sin añadir clases de forma manual)jQuery: resalte incluso columnas (no filas)
Mi marcado es:
<table>
<caption>Table caption</caption>
<thead>
<tr><th scope="col">Table header 1</th><th scope="col">Table header 2</th><th scope="col">Table header 3</th><th scope="col">Table header 3</th></tr>
</thead>
<tbody>
<tr><th scope="row">Table row header</th><td>Table data</td><td>Table data</td><td>Table data</td></tr>
<tr><th scope="row">Table row header</th><td>Table data</td><td>Table data</td><td>Table data</td></tr>
<tr><th scope="row">Table row header</th><td>Table data</td><td>Table data</td><td>Table data</td></tr>
<tr><th scope="row">Table row header</th><td>Table data</td><td>Table data</td><td>Table data</td></tr>
</tbody>
</table>
(que puede o no puede contener attribs alcance o th
etiquetas)
+1: Gracias por su comentario en mi respuesta y la disponibilidad para la solución aquí. – Sarfraz
Gracias, este funciona bien (la versión anterior hizo algún tipo de comprobantes;) – Adrian
Necesita más representante para votar :) – Adrian