Bootstrap Set Up Errors: Uncaught ReferenceError: jQuery is not defined & Uncaught Error: Bootstrap's JavaScript

I am creating a bootstrap template.I am getting two errors, I can't figure out what I am doing w

I am creating a bootstrap template. I am getting two errors, I can't figure out what I am doing wrong. When I search for similar issues, it seems to be the scripts are out of order, but I think they are correctly positioned.

THE TWO ERRORS:

Uncaught ReferenceError: jQuery is not defined

Uncaught Error: Bootstrap's JavaScript requires jQuery

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">

<!--IE Edge meta Tag-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<!--Viewport-->
<meta name="viewport" content="width=device-width, initial-scale=1">

<!--Minified Bootstrap CSS from MaxCDN-->
<link rel="stylesheet" href=".3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">

<link rel="stylesheet" type="text/css" href="css/custom.css">

<title>Bootstrap 3.3.5</title>
<meta name="keywords" content="keywords, go, here">
<meta name="description" content="meta description goes here">
</head>

<body>
<h1>header</h1>
<p>Lorem ipsum dolor sit amet, an numquam platonem abhorreant mea, nec at eripuit tincidunt acmodare. Ut sit utinam ridens mune. Nec ad stet utroque periculis. Eu eum errem assueverit. Ius vitae definitionem ea.</p>

<!--jquery CDN-->
<script src=".11.4/jquery-ui.min.js"></script>

<!-- Bootstrap's JavaScript -->
<script src=".3.5/js/bootstrap.min.js" integrity="sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" crossorigin="anonymous"></script>

<!--link to local js file-->
<script type="text/javascript" src="js/script.js"></script>
</body>
</html>

I am creating a bootstrap template. I am getting two errors, I can't figure out what I am doing wrong. When I search for similar issues, it seems to be the scripts are out of order, but I think they are correctly positioned.

THE TWO ERRORS:

Uncaught ReferenceError: jQuery is not defined

Uncaught Error: Bootstrap's JavaScript requires jQuery

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">

<!--IE Edge meta Tag-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<!--Viewport-->
<meta name="viewport" content="width=device-width, initial-scale=1">

<!--Minified Bootstrap CSS from MaxCDN-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn./bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">

<link rel="stylesheet" type="text/css" href="css/custom.css">

<title>Bootstrap 3.3.5</title>
<meta name="keywords" content="keywords, go, here">
<meta name="description" content="meta description goes here">
</head>

<body>
<h1>header</h1>
<p>Lorem ipsum dolor sit amet, an numquam platonem abhorreant mea, nec at eripuit tincidunt acmodare. Ut sit utinam ridens mune. Nec ad stet utroque periculis. Eu eum errem assueverit. Ius vitae definitionem ea.</p>

<!--jquery CDN-->
<script src="https://ajax.googleapis./ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>

<!-- Bootstrap's JavaScript -->
<script src="https://maxcdn.bootstrapcdn./bootstrap/3.3.5/js/bootstrap.min.js" integrity="sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" crossorigin="anonymous"></script>

<!--link to local js file-->
<script type="text/javascript" src="js/script.js"></script>
</body>
</html>
Share Improve this question asked Nov 16, 2015 at 15:00 lalalala 451 gold badge1 silver badge5 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 2

Dude, you should link the jQuery lib not jQuery UI )

Just add this code

<script src="https://ajax.googleapis./ajax/libs/jquery/2.1.3/jquery.min.js"></script>

got from here: https://developers.google./speed/libraries/

The answer is in the error. You need jQuery to be referenced first, then Bootstrap CSS, then you need boostrap js. You have jQuery UI, but not the jQuery JS file. To use jQuery UI, you need both jQuery normal file and then the UI file

List in order like this:

  1. Bootstrap CSS file
  2. Your CSS file
  3. jQuery js lib
  4. Bootstrap js lib
  5. jQuery UI js lib

jQuery UI is built on top of jQuery so you will need to include jQuery as well.

<!--jquery CDN-->
<script src="https://ajax.googleapis./ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://ajax.googleapis./ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>

<!-- Bootstrap's JavaScript -->
<script src="https://maxcdn.bootstrapcdn./bootstrap/3.3.5/js/bootstrap.min.js" integrity="sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" crossorigin="anonymous"></script>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744328483a4568769.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信