Home › Forums › JavaScript › JQuery variable to CSS? › Reply To: JQuery variable to CSS?
September 2, 2013 at 11:08 am
#148804
TheDoc
Member
The css()
function styles a particular element that you’ve selected. It all depends on how you want the styles to work.
If you want users to be able to put in any styles like:
.test {
background: blue;
}
Then you’ll need to do something like this:
$("#sb").append('<style>'+sourceC+'</style>');