The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript JQuery variable to CSS? Reply To: JQuery variable to CSS?


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: