JSFiddle - React, Tailwind, and code Playground
by jpark7ca
HTML
<div class="alerts" dy="2014" dm="1" dd="31" th="16" tm="30" ts="0" >
<h4> <i class="icon-exclamation-sign"></i>ATTENTION SANTA ANA: </h4><p>Your telephone system will experience service interruptions on Friday, January 31 from 5:30pm - 11:00pm.
Inbound and outbound calls and voice mail will be affected. Please contact the IT Help Desk at (213) 894-6133 with questions.</p>
</div>
CSS
div.noalerts{
display: none;
}
JavaScript
var ndate = new Date( $(".alerts").attr("dy"), $(".alerts").attr("dm")-1, $(".alerts").attr("dd"), $(".alerts").attr("th"), $(".alerts").attr("tm"), $(".alerts").attr("ts"))
//alert(ndate);
//alert(new Date());
if(new Date() > ndate){
//alert("entered");
$(".alerts").addClass("noalerts");
$(".alerts").removeClass("alerts");
}