$('#liveUpdate').click(
$.getJSON("http://freegeoip.net/json/", function(data) {
var country = data.country_name;
var ip = data.ip;
});
alert(country);
});
I wanted to use country outside getJSON but not the correct result. Tried to define variable top of the click function but not resolved my problem.
How can I fix it?