I'm using a countdown plugin but I want to create a future countdown start date > end date. For example if now [ 2015/05/16 00:00:00
] I want to create start date [ 2015/06/16 00:00:00
] to end date [ 2015/07/16 00:00:00
] to show div
content and also hide other div
content before start date and after end date.
Also searched another plugins :
This Code would only start the countdown when the actual day is between the start- and enddate and will work for the jQuery countdown.
<div id="element"></div>
<script type="text/javascript">
var startdate = "2015/06/16",
enddate = "2015/07/16";
if(new Date() >= new Date(startdate) && new Date() <= new Date(enddate)) {
$("#element")
.countdown(enddate, function(event) {
$(this).text(
event.strftime('%D days %H:%M:%S')
);
});
}
</script>