javascript - Hide <div> for country IP -


i hide <div> 1 country. works when use api test it, reason doesn't work when put on website. there can host on website or similar? i'm using wordpress.

here's code

$.get("freegeoip.net/json/";, function(response) {   if (response.country_code != 'ba') {     if (jquery.cookie('prikazii') == null) {       if (ref.match(/^https?:\/\/([^\/]+\.)?facebook\.com(\/|$)/i)) {         document.getelementbyid('chat').style.display = 'block';       }     }   } }, "jsonp"); 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -