title: jQuery CSS: Dynamically change attributes of a class
body: <p>I want to change the attribute of a class on which all element that use the class for the rest of the web application life (from start of use until the user exits the web application) will be affected.</p>
  
  <p>html:</p>
  
  <pre><code>&lt;p class="myClass"&gt;
      What?
  &lt;/p&gt;
  &lt;p class="myClass"&gt;
      Now?
  &lt;/p&gt;
  </code></pre>
  
  <p>css:</p>
  
  <pre><code>.myClass{
      background-color: #ffff00;    
  }
  </code></pre>
  
  <p>js:</p>
  
  <pre><code>$(".myClass").css("background-color", "#00FFFF");
  $("p").last().after("&lt;div class='myClass'&gt;Now!&lt;/div&gt;");
  </code></pre>
  
  <p><a href="http://jsfiddle.net/marlberm2014/tRqBV/">Here is a sample</a></p>
  
  <p>What I want to achieve from the sample is that all subsequent dynamically added myClass will have the new attribute. From the jsFiddle, you'll see that the next added element doesn't have the new attribute.</p>
  
  <p><strong>MORE:</strong></p>
  
  <p>I'm just using the color for a basis, I will implement this in larger scale, what I want to accomplish is to dynamically change the attributes of a class that will be used for the entire web app life cycle.</p>