11894 shaares
362 private links
362 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.