Forecast Project


#1

Hi,

I have a couple of questions and I hope somebody would enlighten me.

  1. In index.html page, the instruction says In div class="main", there are five div class="day" elements. When I look into the codes given, it was written as div class="day row. Are they the same thing ?

  2. When the toggle is used for ".hourly " div , which is the next of ".day"div, I cannot write like $('.hourly').toggle(); or $('.hourly').next().toggle();
    Instead, it would work only with $(this).next().toggle();. Isn't it calling ('.hourly')the same thing as calling the next of (this),which is ('.day') div, the same this as "hourly"div ?


#2

Hi San,

  1. A space in the class="" attribute is a separator, so there are multiple classes. Using your example, you could select either the .day class or the .row class, and the same HTML element would show up.
  2. I haven't done this project yet, so I don't know how that part of the code is working :confused: