-2
$(window).on('load', function() { ... }
のが、トリガーする前にindex.html
とのすべてのコードを考慮しているかどうかを知りたいと思います。ページをjQueryでプリロードする
index.htmlを
<html>
<body>
... html code ...
<script src="dist/main-min.js"></script>
<script src="dist/preloader-min.js" charset="utf-8"></script>
</body>
</html>
メイン-min.js
$(document).ready(function() {
... js code ...
})
プリロード-min.js
$(document).ready(function() {
$(window).on('load', function() {
... js code ...
});
})
この質問には、提供される限られた情報とスクリプトで答えられません。問題を再現するのに必要なスクリプトとマークアップを含めてください。 – Korgrue
@ Korgrue私は主な質問にのみ焦点を当てています。忍耐力ありがとうございます。 –