Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I got an error Bootstrap's JavaScript requires jQuery.

Here my scripts Order.

HTML
<script src="../../Scripts/jquery-2.1.0.min.js"></script>
    <script src="../../Scripts/jquery-ui-1.10.4.min.js"></script>
    <link href="../../Content/jquery-ui.min.css" rel="stylesheet" />
    <script src="../../Scripts/select2.js"></script>
    <script src="../../Scripts/Tile/nbrscript.js"></script>
    <script src="../../Scripts/bootstrap.min.js"></script>


What I have tried:

Bootstrap's JavaScript requires jQuery
Posted
Updated 28-Nov-21 15:19pm
Comments
CHill60 17-Mar-16 7:35am    
Well you appear to have them in the right order. Are all those .js files present in the Scripts folder? Any chance one of them could be corrupt?
amnk.info 17-Mar-16 7:53am    
Thanks for reply. i will check

Possible checks

*Make sure that all those referenced .js files are present in the scripts folder

*once the page is rendered, right click on the page and click view source, there you can find the links for the js file, click any one of the js file and see whether it actually navigates to the source. from this you will get some idea of the path. based on this you can modify the hardcoded js path.

*Try to remove the [../../] and run.
this depends on the directory structure of your solution, if the Scripts folder is present in root directory then you can write like this
C#
<script src="Scripts/jquery-2.1.0.min.js"></script>

Let me know if you still face the issue. 

Thanks
 
Share this answer
 
v2
IE sometimes switches to compatibility mode or IE7 or lower version if its an intranet site.. beware
So go to IE settings , security, Local Intranet , Advanced and check if your site is listed there.
remove it and if need remove auto detect intranet sites
I lost 2 days to figure this out
 
Share this answer
 
just add before the bootstrap import script. Copy the latest CDN here: cdnjs.com/libraries/jquery
 
Share this answer
 
Comments
Richard Deeming 29-Nov-21 4:54am    
If you'd read the already-solved question, you'd see that the OP had already included jQuery.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900