自从我从升级jQuery 1.x/ jQuery 2.x到jQuery 3.x,我现有的代码不会被正确地执行了.一切正常,但load事件监听器不再被触发或有时被触发:
$(function() {
$(window).on("load", function() {
// this line will never/occasionally be executed
console.log("window is loaded!");
});
});
Run Code Online (Sandbox Code Playgroud)