Skip to content

Instantly share code, notes, and snippets.

@halhenke
Created September 8, 2015 07:44
Show Gist options
  • Save halhenke/2ce6f43952e74cf17ee4 to your computer and use it in GitHub Desktop.
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)
(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