Created
January 21, 2014 12:06
-
-
Save pablolobos/8538827 to your computer and use it in GitHub Desktop.
javascript_css-pseudo.js
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
// Get the color value of .element:before | |
var color = window.getComputedStyle( | |
document.querySelector('.element'), ':before' | |
).getPropertyValue('color'); | |
// Get the content value of .element:before | |
var content = window.getComputedStyle( | |
document.querySelector('.element'), ':before' | |
).getPropertyValue('content'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment