实际上,我使用了一个模板,它包含了很多页面,所以我想使用其中的一个模板,所以我想我做了所有正确的事情,但是它在控制台未定义时显示了这个错误: jQuery没有定义--这是我唯一的html脚本
<script src="assets/js/pages/custom/wizard/wizard-1.js"></script>我经常检查路径,这是一条正确的路径,我不知道在这些错误中给你们提供什么,所以这是我的index.html
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>Gestion Commerciale</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="./assets/media/svg/illustrations/logo.png">
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700|Roboto:300,400,500,600,700"
rel="stylesheet">
<link href="assets/css/pages/wizard/wizard-1.css" rel="stylesheet" type="text/css" />
<!-- Splash Screen | Appears during application initialization proccess -->
<style>
body {
margin: 0;
padding: 0;
}
#splash-screen {
position: absolute;
z-index: 1000;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background-color: #f2f3f8;
}
#splash-screen img {
margin-left: calc(100vw - 100%);
margin-bottom: 30px;
}
#splash-screen.hidden {
opacity: 0;
visibility: hidden;
}
.splash-spinner {
animation: rotate 2s linear infinite;
margin-left: calc(100vw - 100%);
width: 50px;
height: 50px;
}
.splash-spinner .path {
stroke: #5d78ff;
stroke-linecap: round;
animation: dash 1.5s ease-in-out infinite;
}
@keyframes rotate {
100% {
transform: rotate(360deg);
}
}
@keyframes dash {
0% {
stroke-dasharray: 1, 150;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -35;
}
100% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -124;
}
}
</style>
</head>
<body root id="kt_body">
<div id="splash-screen">
<img src="./assets/media/svg/illustrations/logo.png" alt="Gestion-Commerciale-Logo" />
<svg class="splash-spinner" viewBox="0 0 50 50">
<circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5"></circle>
</svg>
</div>
</body>
<script src="assets/js/pages/custom/wizard/wizard-1.js"></script>
</html>发布于 2021-08-11 12:35:53
向导-1.js可能取决于jQuery。如果是这样,则需要在jQuery向导-1.js之前加载。
可以这样做:
<body root id="kt_body">
<div id="splash-screen">
<img src="./assets/media/svg/illustrations/logo.png" alt="Gestion-Commerciale-Logo" />
<svg class="splash-spinner" viewBox="0 0 50 50">
<circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5"></circle>
</svg>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="assets/js/pages/custom/wizard/wizard-1.js"></script>
</body>另一个技巧是,在body标记的底部添加脚本标记。
发布于 2021-08-11 12:23:32
我想您的库需要jquery,但是您没有将它包含在Html中,尝试添加以下内容:
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>https://stackoverflow.com/questions/68741847
复制相似问题