Sample File
You can add this script by simply adding the following code to your html, or by adding the divs we previously discussed. The following code adds two divs (IDs, example1 and example2), once added you need to reference those IDs in your init.js script.
1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
<meta charset="utf-8">
5
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6
<meta name="viewport" content="width=device-width, initial-scale=1">
7
<title>My Weather</title>
8
<link href="/weather.min.css" rel="stylesheet">
9
</head>
10
<body>
11
<div class="today" id="example1"></div>
12
<div class="forecast" id="example2"></div>
13
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
14
<script src="/weather.min.js"></script>
15
<script src="/init.js"></script>
16
</body>
17
</html>
Copied!
The last thing you need to do is add the script variables to your init.js that customize your forecast data.
Copy link