9911 shaares
256 private links
256 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.