Fixed weird score bug.

master
q3k 2012-10-18 22:42:11 +02:00
parent d6c2e9d71d
commit 41ffb610e8
1 changed files with 10 additions and 7 deletions

View File

@ -7,13 +7,16 @@ $(function(){
function vote_click() { function vote_click() {
var url = $(this).attr("href"); var url = $(this).attr("href");
var header = $(this).parent(); var header = $(this).parent();
$.get(url, function(data) { if (url != "#")
var html = $(".quoteheader", data).html(); {
header.html(html); $.get(url, function(data) {
$(".upvote", $(header)).click(vote_click); var html = $(".quoteheader", data).html();
$(".downvote", $(header)).click(vote_click); header.html(html);
}); $(".upvote", $(header)).click(vote_click);
return false; $(".downvote", $(header)).click(vote_click);
});
return false;
}
} }
$(".upvote").click(vote_click); $(".upvote").click(vote_click);
$(".downvote").click(vote_click); $(".downvote").click(vote_click);