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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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.


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.


                <body id="bod">

  <div id="tstuff">
  <li class="a" id="cityName"> </li>
  <li class="a" id="cel"> </li>
  <li class="a" id="weatherType"> </li>
  <li class="a" id="windInfo"></li>
  <button id="but" class="btn btn-default"> Click here to change to Metric/Imperial</button>


  -webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;

.a{ text-align:center;
  font-size: 90px;
#tstuff {
  background-color: rgba(255, 255, 255, 0.3);

 width: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  margin: 0 auto;



                $(document).ready(function() {
  //empty vars for use below
  var ftemp;
  var ctemp;
  var long;
  var lat;
  var conversion = true; //this must be a boolean
  // var api = `${}&lon=${coord.long}`;
  var coord = {};
  function location() {
    if (navigator.geolocation) {
      navigator.geolocation.getCurrentPosition(function(position) {
        coord.long = position.coords.longitude; = position.coords.latitude;
        console.log(long, lat);

          "latitude: " + + "<br>longitude: " + coord.long

        // var api = `${lat}&lon=${long}`;
  function weather() {
      "" + +
        "&lon=" +
      function(data) {
        console.log(, coord.long);
        // This is the information that I want to display coming from the api
        var weatherType =[0].description;

        var cel = data.main.temp;
        var windInfo = data.wind.speed;
        var cloudInfo = data.clouds.all;
        var cityName =;

        //end of the information still in Json call function here
        //temperature conversions
        ftemp = cel * (9 / 5) + 32;
        ctemp = (ftemp - 32) * (5 / 9);
        //temperature conversions
        // within the same function i will be targting the HTML with jQuery here

        $("#cel").html(cel + "   C°");
        $("#windInfo").html(windInfo + "  mph");

        //This will be the button making the conversion from ctemp to ftemp

        $("#but").click(function() {
          if (conversion === true) {
            $("#cel").html(ftemp.toFixed(2) + "   F°");
            conversion = false;
          } else if (conversion === false) {
            $("#cel").html(ctemp.toFixed(2) + "   C°");
            conversion = true;
        //end of the button to convert
        if (ctemp <= 0) {
         $("#bod").css("background-image" , "url(");
        else if (ctemp <= 24) {
          $("#bod").css("background-image", "url(");
          // $("body").css("backgroundColor", "yellow");
        } else {
          $("#bod").css("background-image", "url(");


//COLD link :

//MILD link:

//HOT link: