Created
May 31, 2016 19:12
-
-
Save phsantiago/e073d696ace02b3c34360e5a060f0bb2 to your computer and use it in GitHub Desktop.
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() { | |
var regras = []; | |
function __constructor(){ | |
$('head').append('<style type="text/css" custom></style>'); | |
} | |
this.addRule = function(regra, conteudo) { | |
return $('style[custom]').append(regra + ' { ' + conteudo + ' } '); | |
}; | |
this.updateRule = function(regra, conteudo) { | |
return $('style[custom]').text(regra + ' { ' + conteudo + ' } '); | |
}; | |
__constructor(); | |
} | |
var css = new Css(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment