Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <div id="wrap">
  <div id="main" class="container clear-top text-center">
    <!-- quote card -->
    <div class="jumbotron">
        <p id="resultText">Open the console in your DevTools and refresh</p>
    </div><!-- jumbotron -->
  </div><!-- container -->
</div><!--   wrap -->
  
<!-- footer -->
<footer class="bg-footer footer-app-colophon text-gray-light text-sm text-center">
  <p>Bootstrap Theme designed and coded with &nbsp;<i class="fa fa-star fa-1" title="stars" aria-hidden="true"></i>&nbsp; by 
    <a href="https://codepen.io/lorepirri/full/WpBJKO/" title="lorepirri" target="_blank">me</a>
    :)</p>
</footer>

              
            
!

CSS

              
                  .container {
    padding: 70px 0px 70px 0px;
  }

  .jumbotron {
    background-color: orange;
    margin-left: 2%;
    margin-right: 2%;
    padding-bottom: 10px;
    margin-bottom: 10px;
  }

  .jumbotron p {
    color: #435071;
    font-size: 21px;
  }

  footer {
    font-size: 14px;
    font-weight: 300;
    padding-top: 30px;
    padding-bottom: 30px;
    color: grey;
    position: relative;
    margin-top: -60px; /* negative value of footer height */
    height: 60px;
    clear:both;
    padding-top:20px;
  }

html, body {
  height: 100%;
}

#wrap {
  min-height: 100%;
}

#main {
  overflow:auto;
  padding-bottom:150px; /* this needs to be bigger than footer height*/
}

              
            
!

JS

              
                // You can play around with these querystrings (see https://github.com/lorepirri/open-weather-map-proxy)

// NB if you want to see real data, use: nomockupme=1
// NB if you want to hide debug information, and get exactly what OWM responses, use: nodebugme=1

// whatever ID, mockup values, debug info
// ?id=0&nomockupme=1&nodebugme=1

// whatever ID, mockup values, no debug
// ?id=0&nomockupme=1&nodebugme=1

// invalid ID, real OWM request, no debug
// ?id=0&nomockupme=1&nodebugme=1

// valid ID, real OWM request, no debug
// ?id=2950159&nomockupme=1&nodebugme=1

$(document).ready(function() {

  $.ajax({
    url: "https://script.google.com/macros/s/AKfycbzK_moMuvXmDreD9YnNb_K9GfXoTKCHLE85jx_jNd-5tVAl0so/exec?id=2950159&nomockupme=0&nodebugme=1",
    datatype: 'json',
    error: function(err){
      console.log('error!');
      console.log(err);
    },//error
    success: function(result){
      if (result.cod === 200) {        
        console.log('success!');
      } else {
        console.log('OWM querystring has an error!');        
      }
      console.log(result);
    }//succes
  });

});

              
            
!
999px

Console