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 trialrajbee
6,657 PointsWhy look at node properties in MDN website to find parent of an element ?
At 3:50, he wants to get the parent element (li) of a checkbox element. He did not find any property for that in the element page's properties list. He then scrolls up and clicks the link for node and finds Node.ParentNode. How did he know that he must look at Node and not some other link in the MDN ?
2 Answers
James Bradd
4,597 PointsI believe they explain in one of the earlier videos that each element is a Node in the DOM tree. When moving between elements you are traversing the DOM so you are dealing with nodes (it doesn't matter if it's a div, an li, or a span) and their relationships. I don't think it's something that a random person would just get right away, but they are instructors trying to reinforce that point most likely.
AUTIF KAMAL
11,692 PointsI agree with the last comment...
rajbee
6,657 Pointsrajbee
6,657 PointsMemory is fuzzy here. Is a node a javascript representation of a html element ? DOM ==> HTML Doc and Node ==> Html element ?
sibal gesekki
3,484 Pointssibal gesekki
3,484 Pointsnever explained. this guy doesnt explain anything