assets/JS/script.js
// ajax call to the Open Weather API to get current UV data on selected city
ajax call to the Open Weather API to get current UV data on selected city
ajax call to the Open Weather API to get current UV data on selected city
function uvIndex(lat, lon) {
    var uvURL = "http://api.openweathermap.org/data/2.5/uvi?lat=" + lat + "&lon=" + lon + "&appid=" + apiKey + "&units=imperial";
    $.ajax({
        url: uvURL,
        method: "GET"
    }).then(function (response) {
        console.log(response);
        $("#uvIndex").text("UV Index: " + response.value);
    })
}
function uvIndex ( lat , lon ) { var uvURL = "http://api.openweathermap.org/data/2.5/uvi?lat=" + lat + "&lon=" + lon + "&appid=" + apiKey + "&units=imperial" ; $ . ajax ( { url : uvURL , method : "GET" } ) . then ( function ( response ) { console . log ( response ) ; $ ( "#uvIndex" ) . text ( "UV Index: " + response . value ) ; } ) }
ajax call to the Open Weather API to get current UV data on selected city
ajax call to the Open Weather API to get current UV data on selected city