Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialFuad Muhammad
4,273 PointsWhere (odd) and (even) come from? And what is this?
On this section we find something that will be beginner like me confusing. Because on the querySelector we find the (odd) and (even). And on the DOM, I don't see this word anymore. Where is this come from? And for what?
1 Answer
David Kanwisher
9,751 PointsHere is a fiddle of them in action in CSS to add on to what Timothy was saying:
http://jsfiddle.net/thirtydot/K3TuN/1323/
And one in javascript
Tim Acker
Front End Web Development Techdegree Graduate 31,247 PointsTim Acker
Front End Web Development Techdegree Graduate 31,247 PointsYou need to become familiar with CSS pseudo-classes. These classes are pre-defined. So, in the example given, the odd or even numbered list elements can be selected using :nth-child() pseudo-class with the odd or even keyword, respectively. See link below for more information.
https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes