Created
October 18, 2013 05:15
-
-
Save shenmao1989/7036794 to your computer and use it in GitHub Desktop.
历遍页面z-index 获取最大z-index
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var max = 0; | |
var maxEle; | |
KISSY.each(KISSY.query('*'), function(i){ | |
if(KISSY.DOM.css(i, 'z-index') == 'auto'){return;} | |
var index = parseInt(KISSY.DOM.css(i, 'z-index')); | |
if(max < index){ | |
max = index; | |
maxEle = i; | |
} | |
console.log(index); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment