I'm trying to make appear the result of an ajax request using before(). It works very well, but now I'd like to make appear the result with animation (toggle, slidedown or something).
Here is the code I use:
jQuery.ajax({
type: "POST",
url: "/postcom",
dataType: "text",
data: myData,
success: function(response) {
$("#results_com").before(response);
$("#formcomtext").val('');
},
error: function (xhr, ajaxOptions, thrownError) {
console.log(thrownError);
}
});
html:
<div id="results_com></div>
Thanks