
$(document).ready(function(){
 $("#formComment").submit(function(){
  if( !$("#textareaComment").val() || !$("#inputName").val() ){
    return false;
  }
  $.post("/comment",{
   name   : $("#inputName").val(),
   comment: $("#textareaComment").val()
  },function(r){
   $('#formComment').html("<div style='text-align:center;'>thanks</div>");
  });
  return false;
 });
});

