The jQuery css()
method maps onto the style
property which maps onto the style
attribute.
Rules inside a style
attribute are more specific then rules in a stylesheet, so will always come after them in the cascade.
Instead of altering the CSS on the element directly, alter it by changing the classes the element belongs to and having a pre-prepared stylesheet.