title: Changing HTML Attribute w/ JS in D3
body: <p>The idea is to change the attribute of a specific DOM element, in which the attribute is "transform class" and the value is "selected". </p>
  
  <p>I've tried in both JS: </p>
  
  <pre><code>  var d = document.getElementById("model-chart.span2.dc-chart svg g rect");
    d.setAttribute("transform class", "selected");
  </code></pre>
  
  <p>Along with jQuery</p>
  
  <pre><code> $('#model-chart.span2.dc-chart svg g rect').attr("transform class", "selected");
  </code></pre>
  
  <p>The errors, however, are leading me to believe that you can't have multiple words in the first input for .attr or .setAttribute</p>
  
  <pre><code>Uncaught DOMException: Failed to execute 'setAttribute' on 'Element': 'transform class' is not a valid attribute name.`
  Uncaught TypeError: Cannot read property 'setAttribute' of null
  </code></pre>
  
  <p>Has anyone else ran into this or have any suggestions on how I can change the attribute class of a DOM element immediately after the page is done loading without using the .attr or setAttribute method? </p>