Skip to content

Instantly share code, notes, and snippets.

@AlexChittock
Created April 12, 2012 08:22
Show Gist options
  • Save AlexChittock/2365597 to your computer and use it in GitHub Desktop.
Save AlexChittock/2365597 to your computer and use it in GitHub Desktop.
Find any element with :before pseudo element
/**
* 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