Slide Down Animation with Jquery
문제
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 this 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();
}
제휴하지 않습니다 StackOverflow