Is it possible to alter css class with jQuery? For instance if i have this class defined:
.my-class{
right:10px;
}
and now I want to change it to
.my-class{
right:20px;
}
without having to select all the elements of this class with $(".myClass"). The reason i want to do this is that i am adding a lot of elements at run time in js and it would be nice to swap the class definition ahead of time.
.myClass is defined in css file, otherwise i suppose i could have changed its definition with jsf/jstl had it been on the page.