获取页面z-index最大值

getMaxZIndex = function () {
    var maxZ = Math.max.apply(null, 
      $.map($('body *'), function(e,n) {
        if ($(e).css('position') != 'static')
          return parseInt($(e).css('z-index')) || 1;
    }));
    return maxZ;
};

 

posted @ 2017-03-20 18:17  欧欧欧锋_  阅读(2979)  评论(0编辑  收藏  举报