Here is my code I am getting error related "No 'Access-Control-Allow-Origin' header is present on the requested resource" how to use getJson method properly. Any help would be appreciated
$.getJSON('//freegeoip.app/json/', function(location) {});
Try this :
$.getJSON("//freegeoip.app/json/", function(result){
$.each(result, function(i, field){
$("div").append(field + " ");
});
});