I have got a CSS class like so:
.simpleClass {
width: 25px;
}
And I have a matching element:
If I get it right, You don't want to give property to the instance element of simpleClass
, but would like to give an extra property to the whole class ( covering all instances ) using JS.
In this case, You can use jQuery to append a style element to the head, giving You the opportunity to add additional CSS declarations.
However, I would not recommend this, because it causes Your code, and structure to get messy.
$("head").append("");
This snippet will give extra display:none
property to all .simpleClass
elements existing in the time of doing this, and will also affect every later-inserted .simpleClass
elements.