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() {
var url = $(this).attr("href");
var header = $(this).parent();
$.get(url, function(data) {
var html = $(".quoteheader", data).html();
header.html(html);
$(".upvote", $(header)).click(vote_click);
$(".downvote", $(header)).click(vote_click);
});
return false;
if (url != "#")
{
$.get(url, function(data) {
var html = $(".quoteheader", data).html();
header.html(html);
$(".upvote", $(header)).click(vote_click);
$(".downvote", $(header)).click(vote_click);
});
return false;
}
}
$(".upvote").click(vote_click);
$(".downvote").click(vote_click);