Created
June 18, 2013 16:31
-
-
Save tylerthebuildor/5806949 to your computer and use it in GitHub Desktop.
Adds transparent background to every node in the DOM. Allows for easy collision and overlap inspection. Ctrl-i toggles functionality.
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
// DOM Highlight (Ctrl-i) | |
$(function() { | |
$("<style type='text/css'> .DOMHighlight {background: rgba(0,0,0,0.1);} </style>").appendTo("head"); | |
$('body').keypress(function(e) { | |
if (e.which === 9) | |
$('*').toggleClass('DOMHighlight'); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment