So I made my project for this challenge but I am unable to figure out how to properly apply the container_fluid or img-responsive features to allow mobile phone use of the code, which is html and javascript.
This is my pen https://codepen.io/codeslobode/pen/ZagWBa
the HTML is below
<div class="text-center container-fluid">
<h1> Your Weather Report </h1>
<h2> by codeslobode </h2>
<ul class="list-unstyled">
<li class="btn btn-default" id ="city"> </li>
<li class="btn btn-default" id ="weatherType"> </li>
<li class="btn btn-default" id="far" > </li>
<li class="btn btn-default" id="windSpeed"> </li>
</ul>
</div>
Javascript
$(document).ready(function(){
var long;
var lat;
var far;
var cel;
var kelvin;
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position){
long= position.coords.longitude;
lat= position.coords.latitude;
//
var api = "https://api.openweathermap.org/data/2.5/weather?lat="+lat+"&lon="+long+"&appid=cb7c605cd1f3e9c1b7c52e17c612ae60";
//
$.getJSON(api, function(data){
//
var weatherType= data.weather[0].description;
kelvin = data.main.temp;
var windSpeed = data.wind.speed;
var city = data.name;
var tempSwap=true;
far=(kelvin*(9/5)-459.67).toFixed(2);
cel=(kelvin-273).toFixed(2);
console.log(city);
console.log(weatherType);
console.log(far);
console.log(windSpeed);
$("#city").html(city);
$("#weatherType").html(weatherType);
$("#far").html(far + " ℉");
$("#far").click(function(){
if (tempSwap===false){
$("#far").html(far +" ℉");
tempSwap=true;
}
else{
$("#far").html(cel + " ℃");
tempSwap=false;
}
});
windSpeed= (2.237*(windSpeed)).toFixed(1);
$("#windSpeed").html(windSpeed + "mph");
if (far<70){
$('body').css("background-image", 'url(http://78.media.tumblr.com/17e4bf9d1b017da2a0a067763ee1da91/tumblr_nxwc5vz1uF1uetppko3_1280.jpg)')
}
else if (far>70){
$('body').css("background-image", 'url(http://78.media.tumblr.com/bf4aa3e0fa7f29c22de379425e40beaa/tumblr_oo2u9dAVoB1uetppko1_1280.jpg)')
}
});
});
}
});

