html - How can I use ajax to submit a comment to a site? -
i know have dumb question, , im sorry beginner stupidity...
but there easy way have open text box, when user hits submit comment saved database , comment box shrinks dissapear?
there must dead simple tutorial out there, didn't find one!
thanks!
you can use jquery:
$('.submitbutton').click(function() { var text = $('.textbox').slideup().text(); $('.loading').fadein(); $.post(url, { text: text}, function(response) { $('.loading').fadeout(); //do }); });
Comments
Post a Comment