title: How to register Jquery click event with coffeescript on rails 3.1
body: <p>I am trying to do what seems like it should be simple, but for some reason is eluding me.  I want to add a click event to a link in my tasks.js file like so:</p>
  
  <pre><code>$ -&gt;
    $('.cancel_task').click -&gt; 
      $('#task_form').toggle
  </code></pre>
  
  <p>This renders out as:</p>
  
  <pre><code>(function() {
    $(function() {
      return $('.cancel_task').click(function() {
      return $('#task_form').toggle;
    });
  });
  }).call(this);
  </code></pre>
  
  <p>All I want is something like:</p>
  
  <pre><code>$('.cancel_task').click(function()
  {
    $('#task_form').toggle();
  });
  </code></pre>
  
  <p>How do i accomplish this with coffescript and the rails 3.1 stack?</p>