Commit 943ccd6f63a9fc8abfebe5534f4a336796d1b548

Authored by Victor Costa
1 parent 32f88e65

Fix javascript for join and leave communities

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
public/javascripts/add-and-join.js
1 jQuery(function($) { 1 jQuery(function($) {
2 2
3 $(".add-friend").live('click', function(){ 3 $(".add-friend").live('click', function(){
4 - clicked = $(this) 4 + clicked = $(this);
5 url = clicked.attr("href"); 5 url = clicked.attr("href");
6 loading_for_button(this); 6 loading_for_button(this);
7 $.post(url, function(data){ 7 $.post(url, function(data){
@@ -12,7 +12,7 @@ jQuery(function($) { @@ -12,7 +12,7 @@ jQuery(function($) {
12 }) 12 })
13 13
14 $(".join-community").live('click', function(){ 14 $(".join-community").live('click', function(){
15 - clicked = $(".join-community"); 15 + clicked = $(this);
16 url = clicked.attr("href"); 16 url = clicked.attr("href");
17 loading_for_button(this); 17 loading_for_button(this);
18 $.post(url, function(data){ 18 $.post(url, function(data){
@@ -29,7 +29,7 @@ jQuery(function($) { @@ -29,7 +29,7 @@ jQuery(function($) {
29 }) 29 })
30 30
31 $(".leave-community").live('click', function(){ 31 $(".leave-community").live('click', function(){
32 - clicked = $(".leave-community"); 32 + clicked = $(this);
33 url = clicked.attr("href"); 33 url = clicked.attr("href");
34 loading_for_button(this); 34 loading_for_button(this);
35 $.post(url, function(data){ 35 $.post(url, function(data){