title: Add CSS dynamically
body: <p>I tried the following JQuery method to replace CSS values dynamically but it doesn't work. Any idea which part is wrong?</p>
  
  <p>In my html:</p>
  
  <pre><code>&lt;div class="svg"&gt;
       &lt;button class="type_1"&gt;&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My current CSS that needs to be replaced dynamically:</p>
  
  <pre><code>svg .type_1    
  {
      stroke: rgb(255, 128, 0);
      fill: rgb(255, 128, 0);
  }
  </code></pre>
  
  <p>My current method which doesn't work:</p>
  
  <pre><code> $('.svg .type_' + list.id).css({
          stroke: list.hex_color,
          fill: list.hex_color
   });
  </code></pre>