Change Css Class atribute in code

if you have a class in a style section <style></style>, and this class is going to be assigned to various objects, is there a way to change the class 'before' it gets assigned,
i.e. NOT elementsWithClass.classAtribute='newVal'; //the usual, elements already have class,
but class.classAtribute="newVal";//so now, any new elements assigned the class will already have the newVal atribute.
Who is Participating?
Jagadishwor DulalBraces MediaCommented:
When you want to add value? You can do it using jQuery but you will need some condition like clickevent or load or somethings.

Open in new window

Silas2Author Commented:
Let me just try that...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.