November 2022
Beginner
624 pages
13h 39m
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 32.1, that defines what we will eventually see in the browser.
FIGURE 32.1
The DOM and the browser are like two peas in a pod.
This hierarchy is used to help ...
Read now
Unlock full access