Website with JS doesn't work in IE9 until the Developer Tools is activated

前端 未结 8 1368
情歌与酒
情歌与酒 2020-12-12 15:53

I\'m developing a complex website that heavily leverages jQuery and a number of scripts. On load of the site, none of my scripting is working (though I can confirm that othe

8条回答
  •  不思量自难忘°
    2020-12-12 16:24

    You have console calls, in IE these will fail if the dev tools are not open. A simple fix is to wrap any console calls in a function like:

    function log(msg) {
      if(console)
        console.log(msg);
    }
    

提交回复
热议问题