Improved styling
[dylansserver.git] / includes / ajax.js
index 50541dc..2bc9cce 100644 (file)
@@ -1,4 +1,5 @@
 $(document).ready(function() {
+  $('#recaptcha_widget').show();
   $('.submit').click(function() {
     if ($('#comment_text').val() != '') {
         var challenge = Recaptcha.get_challenge();
@@ -25,6 +26,11 @@ $(document).ready(function() {
                         url: "verify",
                         data: comment_data,
                         success: function() {
+                          var new_post = "<h3><a href='mailto:" + email
+                                          + "'>" + name + "</a></h3>"
+                                                          + text + "<br><br>";
+                          $('#comments').prepend(new_post);
+                          $('#comment').hide();
                           console.log('posted new comment');
                         }
                   });