title: pass arguments to a d3 on "click" event callback
body: <p>Here is my code:</p>
  
  <pre><code>function toggleClass(element, className){
    d3.select(element).classed(className, !d3.select(element).classed(className));
  }
  
  d3.selectAll("rect").on("click", toggleClass(this, "clicked");
  </code></pre>
  
  <p>I cannot get it to work, it appears that passing arguments to a DOM event is bad news bears. Does anyone know a work-around for this?</p>
  
  <p>Thank you</p>