How to find the highest z-index using jQuery

后端 未结 11 1163
终归单人心
终归单人心 2020-11-28 07:42

I have a number of div elements with different z-index. And I want to find the highest z-index among these divs - how can I achieve it?

CSS:

#layer-1         


        
11条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-28 08:45

    Besides @justkt's native solution above, there is a nice plugin to do what you want. Take a look at TopZIndex.

    $.topZIndex("div");
    

提交回复
热议问题