Created
August 5, 2012 02:40
-
-
Save jaimerodas/3261221 to your computer and use it in GitHub Desktop.
Ligar eventos JS con declaraciones de body::after en CSS
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 revisaAncho() { | |
var str; | |
if (window.getComputedStyle && window.document.querySelector) { | |
str = window.getComputedStyle(window.document.body, ':after').getPropertyValue('content'); | |
} else { | |
str = "Regular"; | |
} | |
return String(str).replace(/"/g, ''); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
El replace de la línea 3 arregla (según yo) el que en algunos browsers el
getPropertyValue
agarra el elcontent
con todo y comillas.