coffeescript doesn't update dom element
===

I'm new to coffee script and I'm heaving an issue with binding to an event. 
I have a div, which is update via ajax and then I'd like to have some additional jquery events defined on the returned portion.
This is all running on rails 3.2. 
my js.erb returns this portion fine:

    $('#top_box').empty()
    $('#top_box').append('<%= escape_javascript(render :partial => 'form') %>')


The form partial has one text field on which I want to some additional event handling i.e.

    $('#link_long').on('click',function(){ $('#link_long').val("" );})

When I add the above line to js.erb file then everything works fine, but I wanted to see how this can be done in coffee. So, I translated that line into coffee such as

    $ ->
      $('#link_long').on 'click', ->
        $('#link_long').val("")

The generated js code for coffee is 

    (function() {
    
     $(function() {
     return $('#link_long').on('click', function() {
     return $('#link_long').val("");
     });
     });
    
    }).call(this); 

But the coffee script never works. Can someone tell me why?