JSFiddle - React, Tailwind, and code Playground
HTML
<div class="post" data-post_day="20160406">2015 04 22</div>
<div class="post" data-post_day="20150422">2015 04 22</div>
<div class="post" data-post_day="20150422">2015 04 22</div>
<div class="post" data-post_day="20150415">2015 04 15</div>
<div class="post" data-post_day="20150415">2015 04 15</div>
<div class="post" data-post_day="20150414">2015 04 14</div>
<div class="post" data-post_day="20150413">2015 04 13</div>
<div class="post" data-post_day="20150413">2015 04 13</div>
<div class="post" data-post_day="20150412">2015 04 12</div>
<div class="post" data-post_day="20150411">2015 04 11</div>
CSS
.post {
background: #E9F7FF;
border: 1px solid #9AC7E0;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
color: #4281A5;
margin: 10px 5px;
padding: 5px;
position: relative;
text-align: center;
min-height: 50px;
}
.post.post_exclusive {
background: #FEE1D3;
border: 1px solid #FE6D1E;
-webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
color: #C44002;
}
.ico_exclusive {
background-image:...
JavaScript
$(document).ready(function () {
$(function () {
var date = new Date(),
today = '',
yaer = date.getFullYear().toString(),
month = Number(date.getMonth()) + 1,
day = date.getDate().toString();
if (month < 10) {
month = '0' + month;
}
month = month.toString();
today = yaer + month + day;
$('[data-post_day="' + today + '"]').addClass('post_exclusive').prepend('<div class="ico_exclusive"></div>');
});
});