I'm looking to have a slide down animation (popular on a lot of forms these days) with jquery. I have text injecting into a div. The text is fetched from a database.
success: function(text, textS, xhr){
if(xhr.status){
if (text == "") {
$("#resultsDiv").html(" ");
}
else {
$("#resultsDiv").html(text.replace(/\+/g,"<br/>"));
}
}
},
What do you think is the best way to go about implementing an animation into t开发者_C百科his process?
A quick look in the manual would have shown you what to do:
if (text == "") {
$("#resultsDiv").html(" ").slideUp();
} else {
$("#resultsDiv").html(text.replace(/\+/g,"<br/>")).slideDown();
}
精彩评论