开发者

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();
   }

});

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜