diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl
index f1cb2dbdb8..7092098e49 100644
--- a/public/templates/topic.tpl
+++ b/public/templates/topic.tpl
@@ -11,7 +11,7 @@
@@ -22,7 +22,7 @@
-
{posts.post_rep}
+
{posts.post_rep}
Reply
@@ -78,17 +78,17 @@ socket.on('event:new_post', function(data) {
});
function adjust_rep(value, pid, uid) {
- var post_rep = document.getElementById('post_rep_' + pid),
- user_rep = document.getElementById('user_rep_' + uid);
+ var post_rep = jQuery('.post_rep_' + pid),
+ user_rep = jQuery('.user_rep_' + uid);
- var ptotal = parseInt(post_rep.innerHTML, 10),
- utotal = parseInt(user_rep.innerHTML, 10);
+ var ptotal = parseInt(post_rep.html(), 10),
+ utotal = parseInt(user_rep.html(), 10);
ptotal += value;
utotal += value;
- post_rep.innerHTML = ptotal;
- user_rep.innerHTML = utotal;
+ post_rep.html(ptotal);
+ user_rep.html(utotal);
}