Weather App with Simpleweather.js problems

I was unable to figure out why my weather app only works in codepen and only on Mozilla and IE. Codepen does not work if I run it in Chrome. If I run locally it works but does not display the weather icon. I am bashing my head for few days now. Can someone can give an advise?! Ive been using the Thank you!
Here is my draft

First of all, I was getting some errors in the console for linking to style sheets. You html contains:

<link rel="stylesheet" href="css/style.css">

That is how you link to your style.css in a real web page, but remember that codepen links to your css automatically and this path just confuses it.

Next, I think that navigator.geolocation is problematic because it is htpps and codepen isn’t. I used this instead:

  $.getJSON("", function (data) {
    lat =;
    lon = data.lon;
/* continue with your code */

… or however you need to implement it.

1 Like

Can you elaborate on that more because I am using the JSON method but it isn’t really working in my favor and kinda making the whole thing worse

Here is a link to my project

Help would be very much appreciated from anybody who knows about simpleweather.js