Is there a neat way to get the topmost element using jQuery?
I don't mean with respect to DOM hierarchy. i.e. .closest()
is not what I need.
I mean, with respect to z-index
and obviously it should be currently :visible
I was starting out to write a custom selector, but thought it would be better to see if there are better approaches.