title: jQuery's .click - pass parameters to user function
body: <p>I am trying to call a function with parameters using jQuery's .click, but I can't get it to work.</p>
  
  <p>This is how I want it to work:</p>
  
  <p><code>$('.leadtoscore').click(add_event('shot'));</code></p>
  
  <p>which calls</p>
  
  <pre><code>function add_event(event) {
      blah blah blah }
  </code></pre>
  
  <p>It works if I don't use parameters, like this:</p>
  
  <pre><code>$('.leadtoscore').click(add_event);
  function add_event() {
      blah blah blah }
  </code></pre>
  
  <p>But I need to be able to pass a parameter through to my <code>add_event</code> function.</p>
  
  <p>How can I do this specific thing?</p>
  
  <p>I know I can use <code>.click(function() { blah }</code>, but I call the <code>add_event</code> function from multiple places and want to do it this way.</p>