Hello I learned how to get new date , hours and stuff, today i made a simple clock this is fine but i need to reload the page to get the current time, so how can i make it more realistic, i mean to display it as it's counting, would be much better
$(function() {
var d = new Date(),
currentDay = d.getDate(),
hour = d.getHours(),
minutes = d.getMinutes(),
seconds = d.getSeconds();
if (hour < 10) {
hour = '0' + hour;
}
if (minutes < 10) {
minutes = '0' + minutes;
}
document.write(hour + ' : ' + minutes);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>