admin管理员组

文章数量:1317898

This is my .cshtml code

    <!DOCTYPE Html>
    <html>
        <head>
            <meta charset="utf-8" />
            <meta name="viewport" content="width=device-width" />
            <title>wele</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. Please suggest what should I do to remove this error.

This is my .cshtml code

    <!DOCTYPE Html>
    <html>
        <head>
            <meta charset="utf-8" />
            <meta name="viewport" content="width=device-width" />
            <title>wele</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. Please suggest what should I do to remove this error.

Share Improve this question edited Jun 19, 2014 at 15:17 Sparky 98.8k26 gold badges202 silver badges290 bronze badges asked Jun 8, 2014 at 14:31 user3719840user3719840 311 gold badge1 silver badge4 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

Make sure that the path is correct and points to jQuery version greater than 1.9

You are using 1.8 which is not patible with bootstrap

Source:

https://github./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. Also ensure that you link jquery js script before you link to the bootstrap js script

<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" />

本文标签: bootstrap javascript requires jquery errorStack Overflow