10933 shaares
387 private links
387 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.