function blockColor() {

    var currentBlock = moment().hours();

    $(".time-block").each(function () {
        var time = $(this).find('.hour').text()
        var id = $(this).attr("id")
        var blockHour = moment(time, "hA").hours()
        var description = $(this).find('.description')

        if (blockHour < currentBlock) {
            description.addClass("past");
        }

        else if (blockHour === currentBlock) {
            description.addClass("present");
        }

        else {
            description.addClass("future");
        }

        description.val(schedule[id])

    });
}
// Set block colors for past, present, and future
Set block colors for past, present, and future
Set block colors for past present and future
function blockColor() {
    var currentBlock = moment().hours();
    $(".time-block").each(function () {
        var time = $(this).find('.hour').text()
        var id = $(this).attr("id")
        var blockHour = moment(time, "hA").hours()
        var description = $(this).find('.description')
        if (blockHour < currentBlock) {
            description.addClass("past");
        }
        else if (blockHour === currentBlock) {
            description.addClass("present");
        }
        else {
            description.addClass("future");
        }
        description.val(schedule[id])
    });
}
function blockColor ( ) { var currentBlock = moment ( ) . hours ( ) ; $ ( ".time-block" ) . each ( function ( ) { var time = $ ( this ) . find ( '.hour' ) . text ( ) var id = $ ( this ) . attr ( "id" ) var blockHour = moment ( time , "hA" ) . hours ( ) var description = $ ( this ) . find ( '.description' ) if ( blockHour < currentBlock ) { description . addClass ( "past" ) ; } else if ( blockHour === currentBlock ) { description . addClass ( "present" ) ; } else { description . addClass ( "future" ) ; } description . val ( schedule [ id ] ) } ) ; }
Set block colors for past, present, and future
Set block colors for past present and future