How can I call a function after an element has been created in jquery?

前端 未结 9 2285
野趣味
野趣味 2020-12-28 13:37

I want to call a function after an element has been created. Is there a way to do this?

Example:

$(\"#myElement\").ready(function() {
    // call the         


        
9条回答
  •  情歌与酒
    2020-12-28 14:19

    $("
    ").appendTo("#parent").each(function(){ console.log("I have been created!"); });

提交回复
热议问题