Jquery element contains value in array -> adjust CSS
<p>I made a simple PhP Calendar in combination with Jquery datepicker for my users to make a reservation of an rental object. I give a array with locked dates to the jquery datepicker to block dates that are taken from selection, this works perfect! But i also want to use the array with occupied dates for the PhP calender to adjust the CSS style for the occupied dates. I want to use Jquery:contains for that, but i face a (known) problem with the exact match of dates (see below).</p>

<pre><code>var unavailableDates = ["1_5_2012","2_5_2012","5_5_2012"];
for(var i=0;i&lt;unavailableDates.length;i++){ 
    $("td:contains("+unavailableDates[i]+")").css("color", "red"); 
} 
</code></pre>

<p>Is there an other way to check if a TD elements contains a value in the array, if so than adjust the Css…..</p>
