I'm trying to modifie the JS script so I can get the date from a database instead of typing it manually. I don't really know how to get right format on the date. The plugin only use days, hours, minutes, seconds.
Is there someone that can help me?
Jquery countdown plugin
Original:
$(function () {
var austDay = new Date();
austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 2);
$('#defaultCountdown').countdown({until: austDay});
$('#year').text(austDay.getFullYear());
});
</script>
Modified:
<?php $waa = '1441894898' ?>
<script>
$(function () {
var austDay = <?php echo json_encode($waa); ?>;
$('#defaultCountdown').countdown({until: austDay});
});
</script>