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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <!--User Story: I can see the weather in my current location.

User Story: I can see a different icon or background image (e.g. snowy mountain, hot desert) depending on the weather.

User Story: I can push a button to toggle between Fahrenheit and Celsius.-->

<!-- -->

<!-- example doc header, not needed in Codepen...

<!DOCTYPE html>
<html lang="en">
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>


<!-- Codepen settings...






<!-- -->

<!-- Font Awesome icons for social media links-->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" />

  <div class="row">
    <div class="col-xs-12 text-center" id=title>
      <h1>Local Weather</h1>
    <div class="text-center test-div" id="data">
      test text

  <div class="footer pull-left">
      <script type="text/javascript">
        var d = new Date()
      </script> Marc Vesper Johnson

body {
  background-color: silver;
  color: black;

.btn {
    border-color: black;
    border-radius: 6px;
    border-width: 2px;
    color: black;
    background-color: silver;
    font-family: Scylla, 'Scylla', sans-serif;
    font-size: 140%;
.btn:hover {
    color: silver;
    background-color: black;
    border-color: silver ;

.footer {

  padding-bottom: 5px;
  font-size: 60%;
  padding-left: 15px;

              $(document).ready(function() {
  // Need globals to save data to share around the app
  var lat, long;
  // You need functions to split functionality and make your app organized
  var init = function() {
  var getLocation = function() {
    $.getJSON("http://ip-api.com/json/", function(ipapiData) {
      lat = ipapiData.lat;
      long = ipapiData.lon;
      // You need to use callbacks after the data is saved, otherwise it won't be there

  var getOpenWeather = function() {
    $.getJSON('http://api.openweathermap.org/data/2.5/weather?lat=' + lat + '&lon=' + long + '&APPID=569d4447c12b579f010eb8825b198fbc', function(json) {
  init(); // start the app

}); //docready

/* $("#data").text(output); */
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.