title: JQuery click handler only anonymous function allowed
body: <p>It seems that in jquery click event you can only pass anonymous function. It is not possible to pass a normal javascript function. This lead to problems in my code.</p>
  
  <pre><code>function funcCancelClose(testcaseId,update)
  {
     if(update == false)
     {
          modalCloseCancel(testcaseId);
     }
     else
     {
          modalCloseCancelUpdate(testcaseId, $("#radio-previous_"+testcaseId).val());
     }
  }
  
  var testcaseId = 891;
  var update = false;
  
  $("#modalCancel,#modalClose").click(funcCancelClose(testcaseId,update));
  </code></pre>
  
  <p><strong>This did not work. Even there is no error message in developer console, behavior of code was wrong</strong></p>