简体   繁体   English

引导JavaScript需要jQuery错误

[英]bootstrap javascript requires jquery error

This is my .cshtml code 这是我的.cshtml代码

    <!DOCTYPE Html>
    <html>
        <head>
            <meta charset="utf-8" />
            <meta name="viewport" content="width=device-width" />
            <title>welcome</title>
            <link href="~/Content/bootstrap.css" rel="stylesheet" />
            <script src="~/Scripts/jquery-1.8.0.min.js"></script>
            <script src="~/Scripts/bootstrap.js"></script>
       </head>
       <body>...</body>
    </html>

Whenever I execute my code it gives the bootstrap requires jquery error. 每当我执行我的代码时,它给出的引导都需要jquery错误。 Please suggest what should I do to remove this error. 请建议我该怎么做才能消除此错误。

Make sure that the path is correct and points to jQuery version greater than 1.9 确保路径正确并指向大于1.9的jQuery版本

You are using 1.8 which is not compatible with bootstrap 您正在使用与引导程序不兼容的1.8

Source: 资源:

https://github.com/twbs/bootstrap/blob/v3.1.1/bower.json https://github.com/twbs/bootstrap/blob/v3.1.1/bower.json

Just as Amit Joki said, make sure you link points directly to the jquery file and the file name is spelt accordingly. 就像Amit Joki所说的那样,请确保将链接直接链接到jquery文件,并且文件名也相应地拼写。 Also ensure that you link jquery js script before you link to the bootstrap js script 还要确保在链接到引导js脚本之前先链接jquery js脚本

<script src="path_to_script/jquery-1.8.0.min.js"></script>
<script src="path_to_script/bootstrap.js"></script>
<link href="path_to_script/bootstrap.css" rel="stylesheet" />

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:Bootstrap的JavaScript需要jQuery - Error: Bootstrap's JavaScript requires jQuery 间歇性的“Bootstrap的JavaScript需要jQuery”错误 - Intermittent “Bootstrap's JavaScript requires jQuery” error 未捕获的错误:Bootstrap 的 JavaScript 需要 jQuery - Uncaught Error: Bootstrap's JavaScript requires jQuery Bootstrap错误消息错误:Bootstrap的JavaScript需要jQuery - Bootstrap error message Error: Bootstrap's JavaScript requires jQuery Bootstrap的javascript需要在客户端登录时出现jquery错误 - Bootstrap's javascript requires jquery error in our client side login 错误:Bootstrap 的 JavaScript 需要 jQuery,使用 Webpack - Error: Bootstrap's JavaScript requires jQuery, using Webpack bootstrap.min.js:6未捕获的错误:Bootstrap的JavaScript需要bootstrap.min.js:6上的jQuery - bootstrap.min.js:6 Uncaught Error: Bootstrap's JavaScript requires jQuery at bootstrap.min.js:6 Bootstrap设置错误:未捕获ReferenceError:未定义jQuery和Uncaught错误:Bootstrap的JavaScript需要jQuery - Bootstrap Set Up Errors: Uncaught ReferenceError: jQuery is not defined & Uncaught Error: Bootstrap's JavaScript requires jQuery bootstrap.js:未捕获的错误:Bootstrap的JavaScript需要jQuery 1.9.1或更高版本,但低于版本3 - bootstrap.js: Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3 未捕获的错误:Bootstrap 的 JavaScript 需要 electron 应用程序中 bootstrap.min.js:6 处的 jQuery - Uncaught Error: Bootstrap's JavaScript requires jQuery at bootstrap.min.js:6, in an electron app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM