December 2019
Beginner
464 pages
10h 31m
English
In This Chapter
• Learn how to navigate the DOM tree
• Use the various APIs you have for moving and re-parenting elements
• Find an element’s sibling, parent, children, and more
As you may have realized by now, our DOM looks like a giant tree—a giant tree with elements dangerously hanging on to branches and trying to avoid the pointy things that litter the place. To get a little more technical, elements in our DOM are arranged in a hierarchy as illustrated in Figure 28.1 that defines what we will eventually see in the browser.
FIGURE 28.1
The DOM and the Browser are like two peas in a pod.
This hierarchy is used to ...