Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed follow bug

  • Loading branch information...
commit 14dfa2519f2b5a5b49194af49d59b02791721dd0 1 parent d86f869
David Davis authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 app/assets/javascripts/users.js.coffee
View
8 app/assets/javascripts/users.js.coffee
@@ -1,17 +1,17 @@
$ ->
- $("th.follow a:contains('Follow')").live "click", (event) ->
+ $("td.follow a:contains('Follow')").live "click", (event) ->
event.preventDefault()
$(this).hide()
user_id = $(this).closest("tr").attr("id")
$.post "/following", { "following[user_id]": user_id}, (data) ->
- $("tr##{data.user_id} th.follow a:contains('Unfollow')").delay(300).fadeIn(200)
+ $("tr##{data.user_id} td.follow a:contains('Unfollow')").delay(300).fadeIn(200)
return false
- $("th.follow a:contains('Unfollow')").live "click", (event) ->
+ $("td.follow a:contains('Unfollow')").live "click", (event) ->
event.preventDefault()
$(this).hide()
user_id = $(this).closest("tr").attr("id")
$.ajax url: "/following/#{user_id}", type: "delete", success: (data) ->
- $("tr##{data.user_id} th.follow a:contains('Follow')").delay(300).fadeIn(200)
+ $("tr##{data.user_id} td.follow a:contains('Follow')").delay(300).fadeIn(200)
return false
Please sign in to comment.
Something went wrong with that request. Please try again.