Passing a parameter on click gives an error : <pre><code>  $(".editorCancel").click({param1: kind}, closeMainMenu);

  function closeMainMenu(event){
       console.log(event.data.param1);
  }
</code></pre>

<p>This will print the right value  <code>param1</code>, <strong>but also print an error :</strong></p>

<blockquote>
  <p>Cannot read property 'data' of undefined</p>
</blockquote>

<p>So if i get the right values, why is the error ?</p>
