title: How to override the inline style by applying a new class in D3
body: <p>All:</p>
  
  <p>I used D3 to add style to SVG element like:</p>
  
  <pre><code>svg.append("rect")
     .attr("id", "testclass")
     .classed("hascolor", true)
     .style("fill", "red");
  </code></pre>
  
  <p>Then I define another class:</p>
  
  <pre><code>.nocolor{
      fill: transparent;
  }
  </code></pre>
  
  <p>And when I want to apply this class to change style like:</p>
  
  <pre><code>svg.select("#testclass")
     .classed("nocolor", true);
  </code></pre>
  
  <p>The class of RECT changed, but the style did not apply( it only works when I use JS to change the style directly). I wonder if anyone could help with this to enable style changing by class on it?</p>
  
  <p>Thanks</p>