Skip to content

Instantly share code, notes, and snippets.

@tenphi
Created September 9, 2015 15:50
Show Gist options
  • Save tenphi/d36437b4465be8429e01 to your computer and use it in GitHub Desktop.
Save tenphi/d36437b4465be8429e01 to your computer and use it in GitHub Desktop.
highlight all elements with certain css property with jquery
function css( element, property ) {
return window.getComputedStyle( element, null ).getPropertyValue( property ) || '';
}
$('*').each(function(i, el) {
if (~css(el, 'font-family').indexOf('Arial')) {
$(el).css('outline', '1px solid red');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment