jQuery function after .append

后端 未结 19 2436
栀梦
栀梦 2020-11-27 15:25

How to call a function after jQuery .append is completely done?

Here\'s an example:

$(\"#root\").append(child, function(){
   // Action          


        
19条回答
  •  没有蜡笔的小新
    2020-11-27 15:36

    the Jquery append function returns a jQuery object so you can just tag a method on the end

    $("#root").append(child).anotherJqueryMethod();
    

提交回复
热议问题