How can I change a text/div/pic after an exact date?
For example here's a code what changes the div like an overlay. I would like that result when an exact date past.
So for example after 2018.01.01 the div automatically changes to grey. How should I code this? Tips? :)
$(document).ready(function() {
$("#myDiv").click(function() {
$("#overlay").show();
});
});
#myDiv {
width:100px;
height:100px;
background-color: yellow;
margin: 50px 50px;
padding:10px;
}
#overlay {
display:none;
position: absolute;
width:100px;
height:100px;
background-color: gray;
top: 50px;
left: 50px;
padding: 10px;
opacity: .8;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="myDiv">
<p>Some text</p>
<input type="button" value="A button" >
</div>
<div id="overlay"></div>