mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 19:06:27 +00:00
25 lines
484 B
JavaScript
25 lines
484 B
JavaScript
$(document).ready(function() {
|
|
$(".answer_link").click(function(e) {
|
|
e.preventDefault();
|
|
id = this.id;
|
|
$("#answer" + id).gtoggle();
|
|
});
|
|
|
|
$(".submit_button").click(function(e) {
|
|
id = this.id;
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "questions.php?action=take_answer_question",
|
|
data : {
|
|
"auth" : authkey,
|
|
"id" : id,
|
|
"answer" : $("#replybox_" + id).val()
|
|
}
|
|
}).done(function() {
|
|
$("#question" + id).remove();
|
|
$("#answer" + id).remove();
|
|
});
|
|
});
|
|
});
|
|
|