assets/js/script.js
// Color Coding function to check past, present and future time-blocks 
Color Coding function to check past, present and future time-blocks
Color Coding function to check past present and future time - blocks
function handleColorCoding() {
    currentHour = moment().hour();
    for (var i = 0; i < timeBlocks.length; i++) {
        var timeBlock = $(timeBlocks[i]);
        var timeBlockHour = timeBlock.data('hour');
        if (currentHour === timeBlockHour) {
            timeBlock.find('.desc').addClass('present');
        }
        else if (currentHour > timeBlockHour) {
            timeBlock.find('.desc').removeClass('present');
            timeBlock.find('.desc').addClass('past');
        }
        else {
            timeBlock.find('.desc').removeClass('present');
            timeBlock.find('.desc').removeClass('past'); 
            timeBlock.find('.desc').addClass('future');
        }
    }
}
function handleColorCoding ( ) { currentHour = moment ( ) . hour ( ) ; for ( var i = 0 ; i < timeBlocks . length ; i ++ ) { var timeBlock = $ ( timeBlocks [ i ] ) ; var timeBlockHour = timeBlock . data ( 'hour' ) ; if ( currentHour === timeBlockHour ) { timeBlock . find ( '.desc' ) . addClass ( 'present' ) ; } else if ( currentHour > timeBlockHour ) { timeBlock . find ( '.desc' ) . removeClass ( 'present' ) ; timeBlock . find ( '.desc' ) . addClass ( 'past' ) ; } else { timeBlock . find ( '.desc' ) . removeClass ( 'present' ) ; timeBlock . find ( '.desc' ) . removeClass ( 'past' ) ; timeBlock . find ( '.desc' ) . addClass ( 'future' ) ; } } }
Color Coding function to check past, present and future time-blocks
Color Coding function to check past present and future time - blocks
// timeBlock.parent().eq(2).addClass('present');