Created
March 1, 2017 18:06
-
-
Save MathieuLoutre/18f19cd2dedda456bce7b16cca2cf125 to your computer and use it in GitHub Desktop.
Basic Geo Targeting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.getJSON("http://geoip.nekudo.com/api?callback=?", function (res) { | |
if (res.country && res.country.code === "GB") { | |
$("#retailer-links").html("<li><a href='https://www.amazon.co.uk/'>Amazon</a></li><li><a href='https://www.waterstones.com/'>Waterstones</a></li>") | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment