3. show discription: Why <div class="article"> used in app.js to show description of all the articles?


#1

var main = function() {
  $('.article').click(function() {
    $(this).children('.description').show();
  });
};

why is the class article used while it is is in line 32 of the index.html and excludes the first description.
Would the class '.article current' serve the same purpose?


#2

Hi Dazmera,

I'm not sure I quite understand the second part of that, but it's used on line 32 because that's when they start another article.

The current class represents which article is currently open. It's on the first article by default, but you could move it around to have a different article open at first.


#3

Thanks. But am still not clear.
1. Where is "current" defined to represent which article is open ?
2. is "article current "one class or two

thanks


#4

@dazmera

Nowhere; it lets us humans know which article is currently being shown, and we tell the computer what to do with the current article, but it's not defined anywhere.

Two:

.article
.current