fix voting on newly-posted comments
Bind click event to comments ol instead of existing elements so new ajaxed-in comments can be voted on. Fix #571
This commit is contained in:
parent
b4e18e08e6
commit
b4d3775288
|
@ -385,11 +385,12 @@ var _Lobsters = Class.extend({
|
|||
var Lobsters = new _Lobsters();
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".comment a.downvoter").click(function() {
|
||||
var $olcomments = $("ol.comments");
|
||||
$olcomments.on("click", ".comment a.downvoter", function() {
|
||||
Lobsters.downvoteComment(this);
|
||||
return false;
|
||||
});
|
||||
$(".comment a.upvoter").click(function() {
|
||||
$olcomments.on("click", ".comment a.upvoter", function() {
|
||||
Lobsters.upvoteComment(this);
|
||||
return false;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue