diff options
author | Git <git@what.cd> | 2013-10-13 08:01:01 +0000 |
---|---|---|
committer | Git <git@what.cd> | 2013-10-13 08:01:01 +0000 |
commit | 7100fdf7a7d856e0cf87d7969e525f5a86b9badc (patch) | |
tree | 1f57a7901c6e48f03068911d0379541cb26026c5 /static/functions/questions.js | |
parent | 7c8739fe5e9e9c5afa0801333131bf3d83b088c6 (diff) | |
download | Gazelle-7100fdf7a7d856e0cf87d7969e525f5a86b9badc.zip Gazelle-7100fdf7a7d856e0cf87d7969e525f5a86b9badc.tar.gz Gazelle-7100fdf7a7d856e0cf87d7969e525f5a86b9badc.tar.bz2 |
Empty commit
Diffstat (limited to 'static/functions/questions.js')
-rw-r--r-- | static/functions/questions.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/static/functions/questions.js b/static/functions/questions.js new file mode 100644 index 0000000..4348602 --- /dev/null +++ b/static/functions/questions.js @@ -0,0 +1,24 @@ +$(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(); + }); + }); +}); + |