Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript contains tag using a var Re: contains tag using a var

#112267
dblader2008
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>