Okay, so this is the javascript that I am using Link . The issue that I am having is that the code displays Earth for the user's location instead of the actual city. And if I change the value of
$(".currentLocation").html(city);
to
$(".currentLocation").html(data.name);
instead of a location I just get a blank.
Possibly because you are calling $get instead $.get() in freegeoip request.
Also change the last line to use the getLocation()
$(function() {
getLocation();
});