Reputation: 4687
I want to be able to get as output to the console (or something like this) all the style rules that apply to an element. Such that for example $(_element_).css_styles();
generates output like:
How can I get this?
edit: I built a jfiddle that looks good.
Upvotes: 0
Views: 141
Reputation: 39512
If you're on Chrome, you can use getMatchedCSSRules(element)
. If you're on FireFox (or another Gecko browser), a polyfill is available.
Upvotes: 2