JSFiddle - React, Tailwind, and code Playground

by hiteshbhilai2010

HTML

<script src="http://js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js"></script>
<script src="http://geoapi123.appspot.com/"></script>

JavaScript

$(document).ready(function () {
    /*var country = geoip_country_code();
    var country = geoip_country_code();*/
    //alert("country------>"+ country)
    //console.log(country);

    var c = geoip2.country(onSuccess, onError); //new api
    console.log(c);

    function onSuccess(data){
        alert(111)
        console.log(data);
    }
    function  onError(data){//new api
        console.log("error", data);
    }
    

})