So i'm trying to put https://codepen.io/Mike-was-here123/full/Ozbzqq/ onto repl.it (This project) --> https://repl.it/@John_Nicole/EcstaticDarkorchidDegrees <-- click run
My code also works on Brackets (the codepen code) so it must be repl?
Now there a a couple of unnoticeable issues (not):
- The JavaScript isn't loading in, just like the CSS. I tried
<script src="index.js"></script>
- The CSS isn't loading in, is it not connected right? I have only ever used Codepen so i have never worked with linking before (between CSS, HTML, JS)
- 2 was typed before 1. ^
- The HTML is not flexiable (boostrap) so when, if it works it wont flex.
Here are all my links & stuff, i really need some clarification on how to do this:
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Your local weather</title>
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.min.css'>
<link rel="stylesheet" href="css/style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="index.js"></script>
</head>
Any help is accepted, i'm sorry if thy acting like such a 'noob' but we all learn somewhere. I have never used this area before, and its my weaker area of HTML.
I never included a JavaScript tag because i didn't think something is wrong there, as it works on the codepen. Do API's not working on repl.it ?
// Line 10
navigator.geolocation.getCurrentPosition(function(position) {
lon = position.coords.longitude;
lat = position.coords.latitude;
var api =
"https://fcc-weather-api.glitch.me/api/current?lat=" +
lat +
"&lon=" +
lon;
$.getJSON(api, function(data) {