Hi. I am trying to do an ajax link in Rails 3.2.1 and jQuery. I am
loading jquery.js and jquery_ujs.js.  In my document ready, if I bind
to the event "click," clicking the link fires an event, but if I click
to ajax:beforeSend, it doesn't.  Nothing happens when you click the
link in JQuery.  The event does go to the controller, though.

Works:

$(document).ready(function(){
    $('.approve-item').bind("click", function(evt, xhr, settings){
      alert('click');
    })
    });

Doesn't Work:

$(document).ready(function(){
  $('.approve-item').bind("ajax:beforeSend", function(evt, xhr,
settings){
      alert('before send');
    })
    });

Any ideas on how to trouble shoot this?  I've spent hours on this and
can't find a good reason why this isn't working.

No errors in the Chrome console, for what it's worth.

Thanks for any help,
Kevin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to