jquery event after html() function

前端 未结 5 1127
情话喂你
情话喂你 2021-01-11 19:05

Is there a way to launch an event after html() has been fired? Such as:

$.post(\"ajax.php\", {data :data}, function(data){
   $(\"#countries\").html(data, fu         


        
5条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-11 19:31

    This syntax may also be of interest to you:

    $(selector).html(function(index,oldHTML){
        alert("test");
        return data;
    });
    

提交回复
热议问题