title: Overriding a class with a JQuery method to insert a style element
body: <p>There have been many discussions on related topics but not on this specific question. So, please do not jump and mark it as a duplicate without reading the question carefully.</p>
  
  <p>JQuery does not have any method to modify a class (though it has methods to add and remove classes). On that there are many discussions. The question that I have is that suppose there is a class as in </p>
  
  <pre><code>      .myclass
        {
          property1: value1;
          property2: value2;
          ...
         }
  </code></pre>
  
  <p>I then, dynamically, using JQuery do something like:</p>
  
  <pre><code>     newstyle = "&lt;style type='text/css'&gt;.myclass {property1:newvalue1; property2:                 newvalue2,...} &lt;/style&gt;";
       $('head').append(newstyle);
  </code></pre>
  
  <p>Excuse the typos, if any. The questions that I have are:</p>
  
  <p>Question 1: The dynamically defined class appears to override the statically defined myclass. In a way, is that not dynamic class modification? Is there something about this that is not cross-browser or any other pitfalls?</p>
  
  <p>Question 2: Does it override or supplement the statically defined myclass? I mean, what if statically defined myclass has property1 and other properties and dynamically defined myclass has property 2 only. Will the total properties now defined be the Union of the two classes with intersections been overwritten by the dynamically defined class?</p>
  
  <p>Yes, I tried and got different behaviors but I have no base to know what should be expected. </p>