Home › Forums › JavaScript › contains tag using a var › Re: contains tag using a var
October 18, 2012 at 11:08 pm
#112267
Member
<script type=”text/javascript”>
$(document).ready(function() {
var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth() + 1; //Months are zero based
var curr_year = d.getFullYear();
var today = (curr_month + “/” + curr_date + “/” + curr_year);
//$(‘.start.contains(‘” + today + “‘)’).css(‘background-color’, ‘#999999’);
$(“.start:contains(‘” + today.toString() + “‘)”).css(‘background-color’, ‘#99FF99’);
$(“.end:contains(‘” + today.toString() + “‘)”).css(‘background-color’, ‘#F5BCA9’);
});
</script>