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.


		<h1 id="local"></h1>
		<div id="weatherArea">
			<ul class="conditionList">
				<li>Temperature/<span id="f-cToggle">F°</span></li>
				<li id="temp">n/a</li>
				<li id="wind">n/a</li>
				<li>Present Weather</li>
				<li id="presentWX">n/a</li>
		<script src="js\script.js"></script>


                body {
	background-color: grey;
	background-size: cover;

h1  {
	color: black;
	text-align: center;
	padding-top: 100px;
	font-size: 75px;


#weatherArea {
	box-shadow: inset 0 0 0 1000px rgba(0,0,0,.2);
	margin-left: 30%;
	margin-right: 30%;
	text-align: center;
	border-radius: 5%


.conditionList {
	font-size: 50px;
	padding: 30px;
	color: lightgrey;
	list-style-type: none;

	color: black;


#f-cToggle {
	color: red;


	var lon;
	var lat;
	var fahrenheit;
	// Gets Geolocation
	 if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(function(position) {
	  lon = position.coords.longitude;
	  lat = position.coords.latitude;

	// Applies Geolocation to API request string 
	  var weather = ""+lon+"&lat="+lat;
	// Calls and saves API data request
	$.getJSON(weather, function(data){
		var	celsius = Math.floor(data.main.temp);	
		var	wind = data.wind.speed;
		var presentWX =[0].main;
		var local =;
		fahrenheit = Math.floor(celsius * (9/5) + 32);
    // Posts data to browser
		$("#local").text(local + 'Weather');
		var windMPH = Math.floor(2.237 * wind);

		//Changes Temp from Fahrenheit to Celsius and back
		var tempChange;

			if (tempChange === true) {
				$(this).css("color", "red");
				tempChange = false;
				else {
				$(this).css("color", "blue");
				tempChange = true;	

			// Changes background image depending on present weather conditions
			if (presentWX == 'Clear') {
				$("body").css("background-image", "url(");
			else if (presentWX == 'Clouds') {
				$("body").css("background-image", "url(");
			else if (presentWX == 'Rain') {
				$("body").css("background-image", "url(");
			else if (presentWX == 'Snow') {
				$("body").css("background-image", "url(");
			else if (presentWX == 'Mist') {
				$("body").css("background-image", "url(");
			else if(presentWX == 'Fog') {
				$("body").css("background-image", "url(");