Created
September 8, 2015 07:44
-
-
Save halhenke/2ce6f43952e74cf17ee4 to your computer and use it in GitHub Desktop.
From http://student.wordflyers.com/#/learn/grade_levels Get the maximum z-index (or potentially any style attribute on a page (uses jQuery)
This file contains 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
(Math.max.apply(Math, | |
$.makeArray($('*') | |
.map(function () { | |
return $(this).css('z-index'); | |
}).filter(function () { | |
return $.isNumeric(this); | |
}).map(function () { | |
return parseInt(this, 10); | |
})))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment