I encounter an issue when I destroy an object in AJAX with Rails 3.2.11.

I followed this tutorial:
<http://www.tutorialspoint.com/ruby-on-rails/rails-and-ajax.htm>

The controller works fine, but in the view, nothing is done properly. I think my problem is JQuery, but I'm not sure, so where is my problem?

```
//views/tournaments/index.html.haml
%table.table.table-hover.table-bordered
 %thead
  %th Name
  %th Place
  %th Nb players max
  %th
  - if can? :update, @tournaments
   %th
  - if can? :destroy, @tournaments
   %th
 - @tournaments.each do |tournament|
  %tr
   %td= tournament.name
   %td= tournament.place
   %td= tournament.nb_players_max
   %td= link_to 'Show', tournament
   - if can? :update, @tournaments
    %td= link_to 'Edit', edit_tournament_path(tournament)
   - if can? :destroy, @tournaments
    %td= link_to 'Destroy', tournament, method: :delete, data: {confirm: 'Are you sure?'}, :class => 'delete', :remote => true

```

My controller tournaments\_controller.rb:

```
 def destroy
  @tournament = Tournament.find(params[:id])
  @tournament.destroy

  respond_to do |format|
   format.html { redirect_to tournaments_url }
   format.json { head :no_content }
   format.js   { render :layout => false }
  end
 end

```

destroy.js.erb:

```
console.log("hello");
$('.delete').bind('ajax:success', function(){
 console.log("delete!");
 $(this).parent('tr').fadeOut(400, function(){
  $(this).remove();
 });
});

```

The console tells me that the controller works fine (200 OK), Hello is showed in the console but nothing else...

What happened? :-(

EDIT:

I did a test, creating a project exclusively to test this tutorial and it works fine. But not in my project above :(

EDIT for @DickieBoy:
I tried this but didn't work:

```
$(document).ready(function(){
 $('.delete').bind('ajax:success', function() {
  console.log("delete!");
  $(this).closest('tr').fadeOut(400, function () {
   $(this).remove();
  });
 });
});

```