SyntaxFix
Write A Post
Hire A Developer
Questions
$.ajax({ url: '//freegeoip.net/json/', type: 'POST', dataType: 'jsonp', success: function(location) { alert(location.ip); } });
This code will work https sites too