html – Bootstrap throws Uncaught Error: Bootstraps JavaScript requires jQuery
html – Bootstrap throws Uncaught Error: Bootstraps JavaScript requires jQuery
Try this
Change the order of files it should be like below..
<script src=js/jquery-1.11.0.min.js></script>
<script src=js/bootstrap.min.js></script>
<script src=js/wow.min.js></script>
If youre in a Browser-Only environment, use SridharRs solution.
If youre in a Node/CommonJS + Browser environment (e.g. electron, node-webkit, etc..); the reason for this error is that jQuerys export logic first checks for module
, not window
:
if (typeof module === object && typeof module.exports === object) {
// CommonJS/Node
} else {
// window
}
Note that it exports itself via module.exports
in this case; so jQuery
and $
are not assigned to window
.
So to resolve this, instead of <script src=path/to/jquery.js></script>
;
Simply assign it yourself by a require
statement:
<script>
window.jQuery = window.$ = require(jquery);
</script>
NOTE: If your electron app does not need nodeIntegration
, set it to false
so you wont need this workaround.
html – Bootstrap throws Uncaught Error: Bootstraps JavaScript requires jQuery
you should load jquery first because bootstrap use jquery features.
like this:
<!doctype html>
<html>
<head>
<link type=text/css rel=stylesheet src=css/animate.css>
<link type=text/css rel=stylesheet src=css/bootstrap-theme.min.css>
<link type=text/css rel=stylesheet src=css/bootstrap.min.css>
<link type=text/css rel=stylesheet href=css/custom.css>
<!-- Shuffle your scripts HERE -->
<script src=js/jquery-1.11.0.min.js></script>
<script src=js/bootstrap.min.js></script>
<script src=js/wow.min.js></script>
<!-- End -->
<title>pyMeLy Interface</title>
</head>
<body>
<p class=title1><strong>pyMeLy</strong></p>
<p class=title2><em> A stylish way to view your media</em></p>
<div style=text-align:center;>
<button type=button class=btn btn-primary>Movies</button>
<button type=button class=btn btn-primary btn-lg>Large button</button>
</div>
</body>
</html>