Bootstrap 4 , error because of teher file

330 Views Asked by At

I tried install bootstrap 4, and included following links

<script src="libs/jquery/dist/jquery.min.js"></script>
<script src="js/jquery.js"></script>
<script src="js/scripts.min.js"></script>
<script src="js/parallax.min.js"></script>
<!-- Scrolling Nav JavaScript -->
<script src="js/jquery.easing.js"></script>
<script src="libs/tether/dist/js/tether.min.js"></script>

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>

but it still gives the error

enter image description here

Do you have any idea, hoe to fix it?

2

There are 2 best solutions below

0
On

for Bootstrap 4, you have to respect this order of import

<!-- jQuery first, then Tether, then Bootstrap JS. -->
<script src="/js/jquery-3.1.1.slim.min.js" ></script>
<script src="/js/tether.min.js" ></script>
<script src="/js/bootstrap.min.js" ></script>

<script src="/js/otherJSFiles.js" ></script>
......

It requires exactly three files in that order before you will add your remaining import. So try it to change your files import and put theses three files in that order as your first import.

0
On

You are using an old version of Bootstrap 4. Please use the beta.

In the beta Tether isn't required anymore. You just need jQuery, Popper.js and the Bootstrap JS