A table-based calendar contains weeks with both a date and a number per each date:
<tr>
<td>6<p>16</p></td>
<td>7<p>16</p></td>
<td>8<p>16</p></td>
<td>9<p>16</p></td>
<td>10<p>16</p></td>
<td>11<p>16</p></td>
<td>12<p>16</p></td>
</tr>
Using scripting like $(".table td:contains(0)").css({"background-color": "#900", "color": "white"});
I want to select the color and background-color of all td's containing '0', but not '10', '20', or '30'. At the same time, I want to select the color of all p's containing '0', but not '10'.
I've tried jquery's :contains
and :not(:contains)
, but don't know how to include multiple values in the :not(:contains)
series to avoid css changes in the td's 10, 20 and 30 or the p's 10.
Ideas welcome.