Created
September 9, 2015 15:50
-
-
Save tenphi/d36437b4465be8429e01 to your computer and use it in GitHub Desktop.
highlight all elements with certain css property with jquery
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
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