The jQuery documentation makes a remark, \' It\'s not recommended to use .css() as a setter in production-ready code, but when passing in an object to set CSS, CSS propertie
Your answer to point a
is found on the same page you linked to:
Using CSS Classes for Styling
As a getter, the .css() method is valuable. However, it should generally be avoided as a setter in production-ready code, because it's generally best to keep presentational information out of JavaScript code. Instead, write CSS rules for classes that describe the various visual states, and then change the class on the element.