Как я могу изменить текст/div/pic после точной даты?
Например, вот код, который изменяет div как наложение. Я хотел бы, чтобы результат, когда точная дата прошла.
Так, например, после 2018.01.01 div автоматически становится серым. Как мне это закодировать? Советы? :)
$(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>
It wouldn't be for only a date there'll be a lot of them
--› так что ваш вопрос не имеет отношения к вашей реальной потребности - person Temani Afif   schedule 09.04.2018