Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Day Schedule

Table of Contents

Deployed Site

Visit the Deployed Site! img

Purpose

The purpose of this project was to take my newly learned fundamental skills of javascript and apply them to the use of CDN's!

In this project I used exclusively DayJS and jQuery for my javascript.

Learning Points

$("#currentDay").text(today.format("MMMM DD, YYYY"));

While a simple tool; DayJS provides very convenient access to extremely important date/time information vital for many website structures.

    $(".time-block").each(function(){
      var blockHour = $(this).attr("id").split("-");
      console.log(blockHour);
      if(today.hour() > blockHour[1]){
        $(this).addClass("past");
      }
      else if(today.hour() < blockHour[1]){
        $(this).addClass("future");
      }
      else{
        $(this).addClass("present");
      }
    });

These conditional statements I wrote gave me a chuckle, at first I over-complicated my thought process on how to go about sorting through each time block and give them the according class. At the end of the day i settled with this simple statement that just compares the current hourblock against a value representative of each text box.

I then actually came back to this function and made it more dynamic. The conditional statements I initially wrote were a long string of statements, but this function helped remedy that! Now my page with dynamically check the time block number value against the current hourblock in the day.

Expectation vs Reality

Truth be told, I had anticipated this task to be easier than it had panned out. The starter code I received to work on felt like it had a majority of what I needed to meet the acceptance criteria.

The difficulty of this project majorily came from the use of jQuery, as I'm not only new to it, I am also still new to javascript as a whole.

This project while it defied my expectations in terms of its difficulty, still didn't give me too many issues in the long run. I learned I really like working with DayJS for whatever reason too!

Resources Used

Contact Info

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages