Created
June 28, 2012 03:40
-
-
Save christopherdbull/3008813 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#add_friend").on('ajax:success', function(data, status, xhr){ | |
console.log(this); | |
console.log($(this)); | |
$(this).after('<p>Friend request successfully sent! And now you wait</p>').fadeIn('slow'); | |
$(this).remove().fadeOut('slow'); | |
}); | |
= link_to "Someone Friend this Fucker", friendships_path(:user_id => current_user.id, :friend_id => @user.id), :remote => true, :method => :post, :id => 'add_friend' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment