Created
April 12, 2012 08:22
-
-
Save AlexChittock/2365597 to your computer and use it in GitHub Desktop.
Find any element with :before pseudo element
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
/** | |
* Requires jquery or sizzle | |
* | |
* Webkit compatible | |
* Firefox requires comparison of result of getComputedStyle to that of an | |
* unstyled element, since it's length is always non-zero 0 | |
*/ | |
$('*').filter(function(){return getComputedStyle(this, ':before').length != 0}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment