title: Having trouble with $.get in JavaScript
body: <p>I'm a newbie to JavaScript.  Now that I got that out of the way, I'm experiencing a very weird error.  I'm building an application to show the current weather at your location, and to do this I needed to make an API call for the weather data.  I got the weather data from <a href="http://openweathermap.org/current" rel="nofollow noreferrer">here</a> and at first, my code was working and getting the local weather (for a given latitude and longitude).  However, I was making edits to my code to add functionality and my code suddenly stopped working.  I tried to fix it but I'm flummoxed, I have no idea what I broke.  I'm hoping you guys can help!!</p>
  
  <p>Here is my code for reference:</p>
  
  <pre><code>if (navigator.geolocation) {
      navigator.geolocation.getCurrentPosition(function(position) {
          lat = position.coords.latitude;
          long = position.coords.longitude;
          console.log(lat);
          $.get('http://api.openweathermap.org/data/2.5/weather?lat=' + lat + '&amp;lon=' + long + '&amp;appid=00d71b03a3c50910d8f4f0ea51703bb5', function(data) {
              console.log(data);
              if(lat == 300 || long == 300) {
                  alert("Enable your location to see how the weather is");
              } else {
                  $("#location").text(data.name);
                  var weather = data.weather[0].description;
                  $("#weather").text(weather);
                  temp = Math.round((data.main.temp - 273.15) * 10) / 10.0;
                  $("#temperature").text(temp + "\u00B0 C");
                  var icon = data.weather[0].icon;
                  $("#picture").attr("src", "http://openweathermap.org/img/w/" + icon + ".png");
              } 
          });
      });
  };
  </code></pre>
  
  <p>I put a <code>console.log(data)</code> below the API call to see what is happening, but it doesn't output anything.  Very confused, please help!</p>