title: Where you put ajax callback script code in rails 3.1?
body: <p>I am confusing, where i must put ajax callbacks in rails 3.1, that triggers event beforSend that shows string to user "Wait, please" and hide this string when occur succes. </p>
  
  <pre><code>= javascript_tag "$('#form_remote').bind('ajax:beforSend', function() {$("#mess").show();});"
  %div{:id =&gt; 'mess', :style=&gt;"display:none;"} Wait,please
  = form_tag filling_schedule_of_workings_path, :remote =&gt; true, :html=&gt;{:id =&gt; 'form_remote'} do
    %p{:style=&gt;"margin:0;width:100%"}
      = label_tag 'C '
      = text_field_tag 'date_begin',nil,:size =&gt; 10
      = label_tag 'по'
      = text_field_tag 'date_end',nil,:size =&gt; 10
    %br
    %p{:style=&gt;"margin:0;width:100%"}
      = label_tag 'Schedule class'
      = select_tag 'classifier_schedule',@classifier_schedule,:style=&gt;"width:200px;"
    %p{:style=&gt;"margin:0;width:100%"}
      = label_tag 'Schedule number'
      = select_tag 'schedule_number',@schedule_number,:style=&gt;"width:200px;"
    %div{:style=&gt;"height:25px;border-top:1px solid #CCC;margin:5px 0;"}
      = submit_tag "Doing", :style =&gt; "float:right;"
  </code></pre>
  
  <p>Is this normal?</p>
  
  <p>Help please!!</p>