Thursday 15 July 2010

javascript - How to refresh the CSS so the dynamically generated elements can get styled? -


I'm dynamically generating some elements with jQuery , but I have There are only classes from the style sheet. (I'm amending an app).
How can classes be created in dynamic elements?

The one I found was the way to incorporate all the genre, I do not want this, I want the elements to work with my stylesheet, is there any way?

You can use Runtime on CSS . Class to add .addclass () function

$ ("#element") .addClass ("cssClassName");

For more information see this:

css on the runtime .css () / Code> Function jQuery Library:

$ ('.className'). Css ("background-color", color);

See this for more information:


No comments:

Post a Comment