1

This is my .cshtml code

    <!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. Please suggest what should I do to remove this error.

2 Answers 2

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 compatible with bootstrap

Source:

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

Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.