Exercise:
Add a red color to all ancestors of <span>.
Hint: Use the parents() 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