更新时间:2023-12-04 22:04:04
您可以尝试使用getcript加载jQuery-ui等插件,并在脚本完全加载之前保留ready函数.
You could try to load your plugin like jQuery-ui and other with getcript and hold the ready function(s) before the script is fully loaded
// Hold the ready function(s)
$.holdReady(true);
// Retrieve the script and unlock the ready function(s) when the script is loaded
$.getScript("myplugin.js", function() {
$.holdReady(false);
});
使您准备就绪的功能变得简单
Keeping you ready function(s) simple
$(document).ready(function() {
// your code here
});