Using fadein and append

前端 未结 9 1961
不知归路
不知归路 2020-12-07 10:39

I am loading JSON data to my page and using appendTo() but I am trying to fade in my results, any ideas?

$(\"#posts\").fadeIn();
$(content).appe         


        
9条回答
  •  旧巷少年郎
    2020-12-07 11:33

    First is convert received data to jQuery Object. Second, hide it immediately. Third, append it to a target node. And, after this all, we can clearly use necessary animation, just like fadeIn :)

    jNode = $("
    first
    second
    "); jNode.hide(); $('#content').append(jNode); jNode.fadeIn();

提交回复
热议问题