jQuery未定义(在jQuery UI中)

K20*_*0GH 2 jquery jquery-ui

我已经下载了jQuery 3.2.1和jQuery UI 1.12.1,并且正在像这样加载它们:

<script src="js/jquery-3.2.1.min.js" type="text/javascript"></script>
<script src="js/jquery-ui.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="css/style.css">
Run Code Online (Sandbox Code Playgroud)

我收到未捕获的参考错误:

未捕获的ReferenceError:未定义jQuery(匿名函数)@ jquery-ui.js:14(匿名函数)@ jquery-ui.js:16 index.html:165未捕获的TypeError:table.insertRow不是functionObject.keys.forEach .key @ index.html:165loadResultsIn @ index.html:164loadhistory @ index.html:186onload @ index.html:12

我正在尝试将其与Electron一起使用。不太确定这是怎么回事。也尝试过从CDN加载并且有相同的问题

K20*_*0GH 7

在这里找到解决方案: 电子:未定义jQuery

<!-- Insert this line above script imports  -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>

<!-- normal script imports etc  -->
<script src="scripts/jquery.min.js"></script>    
<script src="scripts/vendor.js"></script>    

<!-- Insert this line after script imports -->
<script>if (window.module) module = window.module;</script>
Run Code Online (Sandbox Code Playgroud)