assets/js/script.js
// CHECK TASK AND CHANGE THE CLASS
CHECK TASK AND CHANGE THE CLASS
CHECK TASK AND CHANGE THE CLASS
function checkTask() {
    time = timeStartsAt;
    var currentTime = moment().hour();
    for (let i = 0; i < 9; i++) {
        var taskEl = $("#" + i);
        if (currentTime > time) {
            $(taskEl).addClass("past");
        } else if (currentTime < time) {
            $(taskEl).addClass("future");
        } else if (currentTime === time) {
            $(taskEl).addClass("present");
        }
        time += 1;
    }
}
function checkTask ( ) { time = timeStartsAt ; var currentTime = moment ( ) . hour ( ) ; for ( let i = 0 ; i < 9 ; i ++ ) { var taskEl = $ ( "#" + i ) ; if ( currentTime > time ) { $ ( taskEl ) . addClass ( "past" ) ; } else if ( currentTime < time ) { $ ( taskEl ) . addClass ( "future" ) ; } else if ( currentTime === time ) { $ ( taskEl ) . addClass ( "present" ) ; } time += 1 ; } }
CHECK TASK AND CHANGE THE CLASS
CHECK TASK AND CHANGE THE CLASS
//convert index into time of time-block // add new class