Bootstrap - Jquery error

Asked

Viewed 506 times

2

I’m trying to make some javascript confections in my project that also uses bootstrap and I need to see the log. However, even using the code provided on the bootstrap website itself, I am getting the following message in the log and the rest of the code does not execute:

Error: Bootstrap’s Javascript requires jQuery

And the code in my head is like this:

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

What’s wrong I can’t make it work?

  • Renan, some bootstrap features need jquery, Voce should reference it as well. http://getbootstrap.com/javascript/ https://jquery.com/

1 answer

2


Add the script of jquerybefore the bootstrap:

<script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-6cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script>
  • 1

    Solved! I only had to take out the Integrity because I was making a mistake. Thank you Sorack!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.