Exercise:
Add a red color to the direct parent AND grandparent of <span>.
Hint: Use the parentsUntil() method.
Edit This Code:
See Result »
div (great-grandparent)
ul (grandparent)
li (direct parent)
span
Result:
Show Answer
Correct Code:
div (great-grandparent)
ul (grandparent)
li (direct parent)
span
Correct Result:
Hide Answer