Is there no shorter/smarter way to add/overwrite CSS statements than with "css(....,....)" command?
Occasionally I want to add/modify CSS statements of the currently loaded webpage.
Lets say I want to add/overwrite the current CSS values with the following new CSS values:
#container article > p { font-size: 16px !important; line-height: 16px !important; font-family: Verdana !important; width: 98% !important; }
As far as I know users have to write therefore in jQuery a difficult, non-intuitive, multiple tags command similar to
$('#container article > p').css({ "font-size" : "16px", "line-height" : "16px", "font-family" : "Verdana", "width" : "98%" });
This is rather uncomfortable. It is e.g. likely to forget a double quote when writing this command.
Isn't there a smarter way to declare the new values in jQuery just as if users would write them originally in CSS script similar to
$('#container article > p').cssadd({ font-size: 16px !important; line-height: 16px !important; font-family: Verdana !important; width: 98% !important; });
?
cssadd(...) is a plcaeholder for the unknown, necessary searched jquery function
Beside this how do I add the !important flag in css() commands?
Thank you
Peter