9423 shaares
228 private links
228 private links
In the console: $0.offsetParent
→ $0
is the currently set element.
Then we can use the offsetParent object property to find the closest ancestor to that element that has its position set to something other than static.