send a jquery callback function inside a variable

后端 未结 5 621
小鲜肉
小鲜肉 2021-02-08 17:52

I have this jquery function

    function example(file, targetwidget, callback){

    $(targetwidget).load(file, {limit: 25}, function(){
        $(\"#widget_acco         


        
5条回答
  •  不知归路
    2021-02-08 18:08

    you need to invoke the function inside the callback

    function example(file, targetwidget, callback){
    
    $(targetwidget).load(file, {limit: 25}, function(){
        callback();
    });
    

提交回复
热议问题