Recently we were building a SharePoint dashboard page where we were using Bootstrap to show some tab views and also we were showing some accordion views in SharePoint online site.
But we saw a scripting error in the developer tools (Google Chrome).
The error message was like below: Uncaught Error: bootstrap’s javascript requires jquery at bootstrap.min.js
bootstrap’s javascript requires jQuery
Since we were using Bootstrap, we were using the below js file.
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.11.1/bootstrap-table.min.js"></script>
But the problem was that jquery files reference was missing in the page. So we gave the jQuery file references like below:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
Sometimes even if both the files are presented, you might also receive the error. That time, both the order of the files is important. Both the files should be presented in the below order.
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.11.1/bootstrap-table.min.js"></script>
After this, the scripting error did not come.
You may like following Bootstrap SharePoint tutorials:
- Bootstrap accordion example
- Bootstrap 4 Forms Designing and Carousel Example
- Bootstrap table
- SharePoint Online branding: Creating Accordion Widget or Collapsible panel with Bootstrap
- Creating Tabbed Menu using Bootstrap and HTML in SharePoint 2016/2013
I hope this tutorial helps to solve bootstrap’s javascript requires jquery error.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site EnjoySharePoint.com