Skip to content

Instantly share code, notes, and snippets.

@shenmao1989
Created October 18, 2013 05:15
Show Gist options
  • Save shenmao1989/7036794 to your computer and use it in GitHub Desktop.
Save shenmao1989/7036794 to your computer and use it in GitHub Desktop.
历遍页面z-index 获取最大z-index
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