change content using javascript

Calendar.prototype._showContent = function(day) {
    // The content box for the clicked day.
        var content = contents[this.currentDayIdx],
        title = content.querySelector('.content__title'),
        description = content.querySelector('.content__description'),
        meta = content.querySelector('.content__meta');

     var d = new Date();
     var todaysDate = d.getDate();
       if (todaysDate < day.number) {
           description.innerHTML='Sorry.You can\'t look early! ';

Did the trick. I guess I was failed with syntax before. Thank you.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top