title: Rails 3 AJAX remote form call backs
body: <p>I'm upgrading from rails 2.3.8 to 3.0.0, so I need to replace the <code>remote_form_for</code> helper calls with <code>form_for(@object, :remote=&gt;true)</code>.</p>
  <p>I've been following along with <a href="http://www.simonecarletti.com/blog/2010/06/unobtrusive-javascript-in-rails-3/" rel="noreferrer">Simone Carletti</a> but I cant seem to get the ajax callbacks from <code>rails.js</code> to fire.</p>
  <p>My generated HTML is:</p>
  <pre><code>&lt;form accept-charset=&quot;UTF-8&quot; action=&quot;/vendor_shipments&quot; class=&quot;new_vendor_shipment&quot; data-remote=&quot;true&quot; id=&quot;formname&quot; method=&quot;post&quot;&gt;
  </code></pre>
  <p>The javascript I'm testing with:</p>
  <pre><code>jQuery(function($){ 
     alert('document ready');
     $(&quot;#formname&quot;)
        .bind('ajax:loading', function() {alert(&quot;loading!&quot;);})
        .bind('ajax:success', function(data, status, xhr) {alert(&quot;success!&quot;);})
        .bind('ajax:failure', function(xhr, status, error) {alert(&quot;failure!&quot;);})
        .bind('ajax:complete', function() {alert(&quot;complete!&quot;);});
  });
  </code></pre>
  <p>The 'document ready' alert fires, and the ajax request is successfully executed (data is posted to the server), but none of the '<code>ajax:____</code>' callbacks fire.</p>
  <p>What am I doing wrong?</p>
  <p>(for what it's worth, the form itself is loaded via ajax)</p>