$(function() {
var time = $('.time h1');
var date = $('.time p');
// INITIALIZING CLOCK
clockInit();
});
// CLOCK INIT FUNCTION
var clockInit = function() {
setInterval(function(){
date = moment(new Date());
time.html(date.format('HH:mm:ss'));
date.html(date.format('dddd, MMMM Do YYYY'));
}, 100);
};
.time{
width: auto;
margin: 0 auto;
background-color: #C2185B;
color: #fafafa;
padding: 1em;
text-align: center;
}
.time h1{
font-size: 5em;
margin-bottom: 0;
text-shadow: 1px 10px 14px #AD1457;
}
.time p{
margin-top: 0;
margin-bottom: 3em;
font-size: 2em;
text-shadow: 1px 10px 14px #AD1457;
}