"article current" div class


#1

Hi

I could see in index.html, only for the first news item, the div class holds both the classes "article and current". All others just have only div tag with the class name article. Whats is the difference?

Thanks
Misc apps


#2

@tagrockstar29579,

Have a read through...
http://www.codecademy.com/forum_questions/55a287509113cb33bd000839


#3

Thanks for the link. It was very helpful. so you have added the current class to the first article just to make the first article so that when the page loads the first article would get the features of the current class by default.

Just couple more clarifications though,

  1. I read this comment in that link and couldnt understand it completely.

"but from now on if we use the jQuery Selection with the argument '.current'
like $('.current') , we know that we have selected 1 Article-Element, with ALL its CHILDREN"

Are you referring to 1st article when you mention "1 Article-Element" or any other article?

  1. So generally, if we have the same class names multiple times, like article, can we consider all those as children of the parent class articles? Or they are all children because of where and how do we open and close the div tags?

Thanks for your time.


#4

@tagrockstar29579,

Read
https://learn.jquery.com/using-jquery-core/traversing/
https://api.jquery.com/category/traversing/