Skip to content

Instantly share code, notes, and snippets.

@jaimerodas
Created August 5, 2012 02:40
Show Gist options
  • Save jaimerodas/3261221 to your computer and use it in GitHub Desktop.
Save jaimerodas/3261221 to your computer and use it in GitHub Desktop.
Ligar eventos JS con declaraciones de body::after en CSS
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, '');
}
@jaimerodas
Copy link
Author

El replace de la línea 3 arregla (según yo) el que en algunos browsers el getPropertyValue agarra el el content con todo y comillas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment