Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // join a group
- $("#joinGroup").click(function(){
- var container = $(this).closest("li");
- container.html("<img src=\'/images/ajax-load-small.gif\' /> Joining Group ");
- $.ajax({
- type: 'POST',
- url: '/groups/51/join',
- data: { group_id: 51 },
- success: function(data) {
- container.html(data)
- .fadeIn('slow')
- .animate({opacity: 1.0}, 2000)
- .fadeOut('slow', function() {
- $(this).replaceWith('Group membership pending approval');}
- );
- }
- });
- });
Add Comment
Please, Sign In to add comment