How to animate dynamically generated html in jquery
I'm fetching tabular data from the server using jquery's ajax function. And I'm using the .html function to assign the fetched data inside a div with an id of list_forms.
How do I animate it?
I'm trying $('#list_forms').html(data).show('slow');
but its开发者_如何学JAVA not working.
$.ajax({
type: "POST",
url: "item_lister.php",
data: "category=" + action,
success: function(data){
$('#list_forms').html(data);
}
});
Try this
$.ajax({
type: "POST",
url: "item_lister.php",
data: "category=" + action,
success: function(data){
$('#list_forms')
.hide()
.html(data)
.fadeIn();
}
});
精彩评论