change css class rules

change css class rules

Hello,
is there any way to change the rules of a css class using jquery?
cause when i use for example $(".classname").css("border","...") it will only change the elements matching this but not the class itself so when i add this class later dynamically to an element it will not be effected by this.
if its not possible how would you solve this? 

Thank you ;)