Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


Save Automatically?

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.


  <div class="container-fluid dataPlacard">
    <div class="gridCity">City</div>
    <div class="gridIcon">Icon</div>
    <div class="gridCond">Condition</div>
    <div class="gridTemp">Temp</div>
    <div class="gridWind">Wind</div>
    <div class="gridHumid">Humid</div>


                body {
  background-image: url("");
  background-size: 100vw 100vh

.dataPlacard {
  margin: auto;
  margin-top: 16px;
  border-radius: 10px;
  background-color: rgb(255, 255, 255, 0.5);
  width: 50vw;
  display: grid;
  grid-gap: 5px;
    'city city'
    'icon condition'
    'temp wind'
    'humidity humidity';

.dataPlacard div {
  text-align: center;

.gridCity {grid-area: city;}
.gridIcon {grid-area: icon;}
.gridCond {grid-area: condition;}
.gridTemp {grid-area: temp;}
.gridWind {grid-area: wind;}
.gridHumid {grid-area: humidity;}


                var tempC;
var tempF;
var humidity;
var windMPH;
var windKPH;
var state;
var city;
var country;
var icon;
var latitude;
var longitude;

$(document).ready(function() {
  var api = "";

  $.getJSON(api, function(data) {
    longitude = data.longitude;
    latitude = data.latitude;
    country = data.country_name;
    city =;
    state = data.region_name;
    zip = data.zip_code;

      "" +
      function(data2) {
        tempC = data2.current.temp_c;
        tempF = data2.current.temp_f;
        humidity = data2.current.humidity;
        windMPH = data2.current.wind_mph;
        windKPH = data2.current.wind_kph;
        icon = data2.current.condition.icon;
        currentCon = data2.current.condition.text;

        $(".gridCity").html("You are in: " + city);
        $(".gridIcon").html(`<img src=${icon}>`);
        $(".gridCond").html("Current Condition: " + currentCon);
        $(".gridHumid").html("Humidity: " + humidity);
        $(".gridWind").html("Wind: " + windKPH +" km/h");

        var unitToggle = true;
        $(".gridTemp, .gridWind").click(function() {
          if (unitToggle===true) {
            $(".gridWind").html("Wind: " + windMPH + "mph");
          } else {
            $(".gridWind").html("Wind: " + windKPH + "km/h");

//I coded this with assistance from Dylan Israel's tutorial which can be found here: