Created
August 27, 2019 15:18
-
-
Save holydevil/20c94710cfaa135c6ceb00a3d747b7fc to your computer and use it in GitHub Desktop.
Script to list out z-index values of all parent nodes
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
//source: https://stackoverflow.com/a/46541425 | |
var el = document.getElementById("#yourElement"); // or use $0 in chrome; | |
do { | |
var styles = window.getComputedStyle(el); | |
console.log(styles.zIndex, el); | |
} while(el.parentElement && (el = el.parentElement)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment