title: Copy CSS style of 1 class applied to one element in a CSS filed to another using Jquery
body: <p>I have a simple situation. Here is the simplified CSS:</p>
  
  <p>EDITED TO CLARIFY:</p>
  
  <pre><code>  #id2 .mycolor
    {
     color:white;                    
     background-color:red;
    }
  
    #id3 .mycolor
    {
     color:green;                    
     background-color:blue;
    }
  
    #id3:active
    {
     color:red;                    
     background-color:white;
    } 
  </code></pre>
  
  <p>I want to dynamically apply these classes to other elements as in:</p>
  
  <pre><code>   $('some_element').addClass(???);
  </code></pre>
  
  <p>Of course I can define a new class which is a copy of the existing ones and use that name. Is there a way of reusing the class that is now tied to other elements or selectors without defining a new one and without having conflicts. For example, how can I dynamically add the class/style in #id2 .mycolor to one element and #id3 .mycolor to another element? Note they are different.</p>
  
  <p>Also, I want the styles statically defined in the file. Not a JS to extract the current styles on the elements they are now associated it. The current style may not be the same as the one defined in the external CSS file. For example, getting $('#id2').css('color') may not return "white" for a whole bunch of reasons.</p>