是否可以在执行第一个 DOM Ready 后手动调用 DOM Ready,例如:
$(document).ready(function() {
alert('Alohaaa!');
});
$(document).ready();
最佳答案
不,不适用于本次事件。但你可以这样做:
$(document).on("mycustomevent", function() {
alert("Alohaa!");
});
然后,只要需要:
$(document).trigger("mycustomevent");
关于javascript - 手动调用 DOM Ready,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17751499/