Commit ba675b51 authored by Nattawut Dumnernpun ( เฟิร์ส ) - Obsolete's avatar Nattawut Dumnernpun ( เฟิร์ส ) - Obsolete
Browse files

Merge branch 'feature/fix_like_cycle' into develop

Showing with 4 additions and 6 deletions
+4 -6
......@@ -60,11 +60,10 @@ function unlikePost(post_id)
},
method: 'PUT',
success: function(jsonData) {
getLike(post_id);
$('#post_' + post_id + ' .btn-like').attr('onClick', 'likePost(' + post_id + ')');
$('#post_' + post_id + ' .btn-like').text('+1');
$('#post_' + post_id + ' .btn-like').toggleClass('btn-seedcamp');
getLike(post_id);
$('#post_' + post_id + ' .btn-like').attr('onClick', 'likePost(' + post_id + ')');
},
error: function(jsonData) {
alert(jsonData);
......@@ -83,11 +82,10 @@ function likePost(post_id)
},
method: 'PUT',
success: function(jsonData) {
getLike(post_id);
$('#post_' + post_id + ' .btn-like').attr('onClick', 'unlikePost(' + post_id + ')');
$('#post_' + post_id + ' .btn-like').text('-1');
$('#post_' + post_id + ' .btn-like').toggleClass('btn-seedcamp');
getLike(post_id);
$('#post_' + post_id + ' .btn-like').attr('onClick', 'unlikePost(' + post_id + ')');
},
error: function(jsonData) {
alert(jsonData);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment