Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


<h1>Source: MtnPowder via Aeris</h1><div class="rich-text">
<div class="rte-table-wrapper">
  <table id="weather-table">
        <th>Wind Gusts</th>
        <th>Wind Chill Temp</th>
  <ul id="aeris"></ul>
  <div id="aeris"></div>
  <div id="timestamp">Last Updated: </div>
</div><div class="rich-text">




                body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.25;

table {
  border: 1px solid #ccc;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
  width: 100%;
  table-layout: fixed;

table caption {
  font-size: 1.5em;
  margin: .5em 0 .75em;

table tr {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  padding: .35em;

table th,
table td {
  padding: .625em;
  text-align: center;

table th {
  font-size: .85em;
  letter-spacing: .1em;
  text-transform: uppercase;



                url = "";
urlAeris =
  " city, utah?format=json&filter=pws&limit=10&fields=id,ob.tempF&client_id=KoNIBE6bnqcQ4YTiaFTD5&client_secret=RZxzy7aOyU29xckR8rcZCcevquPia9jgk6kJjEIe";

var request = new XMLHttpRequest();"GET", "", true);

request.onload = function (data) {
  if (this.status >= 200 && this.status < 400) {
    // Success!
    var data = JSON.parse(this.response);
    var weatherLocation = [
      "Snow Park Lodge",
      "Bald Eagle Peak",
      "Empire Peak",
      "Gondola Base",
      "Bald Mountain Peak",
      "Flagstaff Peak",
      "Empire Canyon Lodge"
    var tableRef = document
    // Add Timestamp
    var timestampDiv = document.getElementById("timestamp");

    const dateOptions = {
      year: "2-digit",
      month: "2-digit",
      day: "2-digit",
      hour: "numeric",
      minute: "numeric"

    let date = new Date(data.LastUpdate);

    timestampDiv.innerHTML += date.toLocaleDateString("en-US", dateOptions);
    timestampDiv.innerHTML += " ";

    for (var i = 0; i < data.CurrentConditions.length; i++) {
      var newRow = tableRef.insertRow();

      var newCell = newRow.insertCell(0);
      var newText = document.createTextNode(weatherLocation[i]);

      //Add temperature
      newCell = newRow.insertCell(1);
      var p = document.createElement("p");
      p.innerHTML = Math.round(data.CurrentConditions[i].TempF);
      var sup = document.createElement("sup");
      sup.appendChild(document.createTextNode(" °F"));

      // Add Wind MPH
      newCell = newRow.insertCell(2);
      if (data.CurrentConditions[i].WindMph === 0) {
        newText = document.createTextNode("—");
      } else {
        newText = document.createTextNode(
          data.CurrentConditions[i].WindMph +
            " " +

      // Add Wind Gusts
      newCell = newRow.insertCell(3);
      p = document.createElement("p");
      if (data.CurrentConditions[i].WindGustsMph === 0) {
        newText = document.createTextNode("—");
      } else {
        p.innerHTML = Math.round(data.CurrentConditions[i].WindGustsMph);
        sup = document.createElement("sup");
        sup.appendChild(document.createTextNode(" MPH"));

      // Add Wind chill
      newCell = newRow.insertCell(4);
      p = document.createElement("p");
      p.innerHTML = Math.round(data.CurrentConditions[i].WindChillF);
      sup = document.createElement("sup");
      sup.appendChild(document.createTextNode(" °F"));
  } else if (this.status >= 201 && this.status < 501) {
    console.log("We reached MtnPowder, but it returned an error");
  } else {
    console.log("Waiting for jQuery");

request.onerror = function () {
  console.log("There was a connection error to Mtn Powder");