by sitharus · 13y ago · 0 comments
"Cats in BOEING EARTH STATION are waiting for you!"
$.ajax({url:"http://freegeoip.net/json", dataType:"json"})
.done(function(data){$('#city').text(data.city)});
freegeoip.net seems to send the "Access-Control-Allow-Origin: *" header which allows the cross-domain ajax call.Picking a city ~800km from where you are is an exercise left for the reader.