How to fix the “pending” status in Chrome Developer Window?

前端 未结 5 1692
旧时难觅i
旧时难觅i 2021-02-19 04:30

When I try to include social media scripts into my page, I get the \"pending\" status in Chrome on some computers (not all of them):

5条回答
  •  花落未央
    2021-02-19 05:27

    Sometimes the script takes more time in loading while the system has moved on. so make sure you wait for get to give you response before you manipulate it. so rather then doing following

    var temp;
    $.get('path/to/filename.ext',function(data){
    
    temp = data;
    
    }
    //use temp
    

    do this

        var temp;
    $.get('path/to/filename.ext',function(data){
    temp = data;
    //use temp
    }
    

提交回复
热议问题