我已经探索了在这里和其他地方找到的合理补救方法,但出于某种原因,cloud9不想让我使用jQuery。我从“底部链接”开始,得到了
$ not defined please fix or add /*global $*/
错误(即使我的代码在
$(document).ready(function () {});
),然后将所有内容上移到
<head>
标记,以便在加载jQuery之前,我的脚本无法尝试运行。不过,同样的错误。有什么好处?
注意,我还尝试反转引导和google jQuery链接的顺序。此外,在前端开发Thx中非常新。
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Bootstrap Links -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- style -->
<style>
.container-fluid {
font-family: Serif, Helvetica;
background-color: #8A2BE2;
color: #FFFFFF;
}
#container-top {
height: 75vh;
margin: 50px 50px 50px 50px;
background-color: #000000;
color: #FFFFFF;
font-size: 50px;
}
/* word-wrap added to ensure quote remained in container */
.quote {
font-family: Serif, Helvetica;
word-wrap: break-word;
}
/*
.vertical-align {
display: flex;
align-items: center;
}
*/
</style>
<!-- scripts -->
<script>
$(document).ready(function () {
});
</script>
</head>
<body>
<div class="container-fluid">