title: d3.js on "click" event handling running function without click event
body: <p>I'm currently doing mouse click event handling for my d3 visualization:</p>
  
  <pre><code>fooCircle.on("click",fooFunction("barParameter"));
  </code></pre>
  
  <p>My problem is that the function is ran without me having to click on the element. I know this because I put print statements within the function.</p>
  
  <p>Interestingly, when I change the function to not be a function that takes in any parameters, the function behaves has it should, meaning it gets ran when I click on the appropriate element:</p>
  
  <pre><code>fooCircle.on("click",fooFunction);
  </code></pre>