This repository has been archived on 2023-10-10. You can view files and clone it, but cannot push or open issues/pull-requests.
cutedb/webapp/static/js/script.js

33 lines
861 B
JavaScript

/* hackerspace.pl js
* by q3k@hackerspace.pl et al
*
* cc by-nc-sa */
$(function(){
function vote_click() {
var url = $(this).attr("href");
var header = $(this).parent();
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);
$(".ajaxhide").click(function() {
var url = $(this).attr("href");
var quote = $(this).parent().parent();
$.get(url, function() {
$(quote).fadeOut("normal");
});
return false;
});
});