If I understand you, you want to add style to certain elements.
You do not need to use .css(a,b) for this. The jQuery function has an addClass("className"); function addClass("className"); which will add a class to any element you want.
$('.originalClass').addClass('addedClass');
It does not overwrite the original.
Is that what you wanted?
EDIT:
Or are you saying you want to change your stylesheet in javascript?
If this is the case, there are javascript rules for changing style sheet properties.
If you (for some reason) cannot change the stylesheet, perhaps you can just save your styles in the object and apply this.
var stylesToAdd = { background:"orange", border:"1px solid blue" }
And use .css() to apply them.
$('#myElement').css(stylesToAdd);
source share